fix bug that made us get stuck if we got RCPT before MAIL.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@70 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
d02760090a
commit
a2f455320e
@ -220,11 +220,12 @@ sub mail {
|
|||||||
sub rcpt {
|
sub rcpt {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->respond(501, "syntax error in parameters") unless $_[0] =~ m/^to:/i;
|
return $self->respond(501, "syntax error in parameters") unless $_[0] =~ m/^to:/i;
|
||||||
return(503, "Use MAIL before RCPT") unless $self->transaction->sender;
|
return $self->respond(503, "Use MAIL before RCPT") unless $self->transaction->sender;
|
||||||
|
|
||||||
my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0];
|
my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0];
|
||||||
$rcpt = $_[1] unless $rcpt;
|
$rcpt = $_[1] unless $rcpt;
|
||||||
$rcpt = (Mail::Address->parse($rcpt))[0];
|
$rcpt = (Mail::Address->parse($rcpt))[0];
|
||||||
|
|
||||||
return $self->respond(501, "could not parse recipient") unless $rcpt;
|
return $self->respond(501, "could not parse recipient") unless $rcpt;
|
||||||
|
|
||||||
my ($rc, $msg) = $self->run_hooks("rcpt", $rcpt);
|
my ($rc, $msg) = $self->run_hooks("rcpt", $rcpt);
|
||||||
|
Loading…
Reference in New Issue
Block a user