Lets the data hook handle missing envelope sender/recipient,
then falls back to the builtin 503 response (Brian Gross) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@359 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
1d1799feb6
commit
31a8e7d438
@ -389,9 +389,6 @@ sub disconnect {
|
|||||||
|
|
||||||
sub data {
|
sub data {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->respond(503, "MAIL first"), return 1 unless $self->transaction->sender;
|
|
||||||
$self->respond(503, "RCPT first"), return 1 unless $self->transaction->recipients;
|
|
||||||
|
|
||||||
my ($rc, $msg) = $self->run_hooks("data");
|
my ($rc, $msg) = $self->run_hooks("data");
|
||||||
if ($rc == DONE) {
|
if ($rc == DONE) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -416,9 +413,9 @@ sub data {
|
|||||||
$self->disconnect;
|
$self->disconnect;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
$self->respond(503, "MAIL first"), return 1 unless $self->transaction->sender;
|
||||||
$self->respond(354, "go ahead");
|
$self->respond(503, "RCPT first"), return 1 unless $self->transaction->recipients;
|
||||||
}
|
$self->respond(354, "go ahead");
|
||||||
|
|
||||||
my $buffer = '';
|
my $buffer = '';
|
||||||
my $size = 0;
|
my $size = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user