Allow DENY to be returned from unrecognised_command again

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@476 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2005-07-06 22:16:08 +00:00
parent 4f0c4d94a1
commit c3562e256d

View File

@ -52,12 +52,13 @@ sub dispatch {
if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
my ($rc, $msg) = $self->run_hooks("unrecognized_command", $cmd);
if ($rc == DENY_DISCONNECT or $rc == DENY) {
$self->log(LOGWARN, "Returning DENY for the unrecognized_command hook is deprecated; use DENY_DISCONNECT")
if $rc == DENY;
if ($rc == DENY_DISCONNECT) {
$self->respond(521, $msg);
$self->disconnect;
}
elsif ($rc == DENY) {
$self->respond(521, $msg);
}
elsif ($rc == DONE) {
1;
}