make the documented DENY{,SOFT}_DISCONNECT work in the data-post hook

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@771 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2007-08-15 16:11:36 +00:00
parent 3a8889ca27
commit ff34740823

View File

@ -728,6 +728,18 @@ sub data_post_respond {
# DATA is always the end of a "transaction"
return $self->reset_transaction;
}
elsif ($rc == DENY_DISCONNECT) {
$msg->[0] ||= "Message denied";
$self->respond(552, @$msg);
$self->disconnect;
return 1;
}
elsif ($rc == DENYSOFT_DISCONNECT) {
$msg->[0] ||= "Message denied temporarily";
$self->respond(452, @$msg);
$self->disconnect;
return 1;
}
else {
$self->queue($self->transaction);
}