- the reporters poposed fix would have caused two messages for the client on
  return(DENY, ...) or a really unknown command.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@772 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2007-08-19 06:49:42 +00:00
parent ff34740823
commit 9c91bb04e6

View File

@ -10,22 +10,8 @@ sub dispatch {
$self->{_counter}++; $self->{_counter}++;
if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) { if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
my ($rc, @msg) = $self->run_hooks("unrecognized_command", $cmd, @_); $self->run_hooks("unrecognized_command", $cmd, @_);
@msg = map { split /\n/ } @msg; return 1;
if ($rc == DENY_DISCONNECT) {
$self->respond(521, @msg);
$self->disconnect;
}
elsif ($rc == DENY) {
$self->respond(500, @msg);
}
elsif ($rc == DONE) {
1;
}
else {
$self->respond(500, "Unrecognized command");
}
return 1
} }
$cmd = $1; $cmd = $1;