don't do the fortune cookie if the client speaks ESMTP instead of just

plain old SMTP.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@55 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2002-09-08 13:23:38 +00:00
parent 48e3d9de39
commit 7f5aedffdc

View File

@ -5,6 +5,11 @@ sub register {
sub quit_handler { sub quit_handler {
my $qp = shift->qp; my $qp = shift->qp;
# if she talks EHLO she is probably too sophisticated to enjoy the
# fun, so skip it.
return (DECLINED) if ($qp->connection->hello || '') eq "ehlo";
my @fortune = `/usr/games/fortune -s`; my @fortune = `/usr/games/fortune -s`;
@fortune = map { chop; s/^/ \/ /; $_ } @fortune; @fortune = map { chop; s/^/ \/ /; $_ } @fortune;
$qp->respond(221, $qp->config('me') . " closing connection.", @fortune); $qp->respond(221, $qp->config('me') . " closing connection.", @fortune);