ca30545adc
take out "local %ENV" from the quit_fortune plugin (Philip M. Gollucci) git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@655 958fd67b-6ff1-0310-b445-bb7760255be9
17 lines
448 B
Plaintext
17 lines
448 B
Plaintext
|
|
sub hook_quit {
|
|
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';
|
|
return DECLINED unless -e $fortune;
|
|
|
|
my @fortune = `$fortune -s`;
|
|
@fortune = map { chop; s/^/ \/ /; $_ } @fortune;
|
|
$qp->respond(221, $qp->config('me') . " closing connection.", @fortune);
|
|
return DONE;
|
|
}
|