Skip to content

Commit

Permalink
don't do the fortune cookie if the client speaks ESMTP instead of just
Browse files Browse the repository at this point in the history
plain old SMTP.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@55 958fd67b-6ff1-0310-b445-bb7760255be9
  • Loading branch information
abh committed Sep 8, 2002
1 parent 48e3d9d commit 7f5aedf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/quit_fortune
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ sub register {

sub quit_handler {
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`;
@fortune = map { chop; s/^/ \/ /; $_ } @fortune;
$qp->respond(221, $qp->config('me') . " closing connection.", @fortune);
Expand Down

0 comments on commit 7f5aedf

Please sign in to comment.