| Newsgroups |
perl.cvs.qpsmtpd |
| Message-ID |
<[email protected]> |
cvsuser 05/01/30 09:40:11
Modified: lib/Qpsmtpd SMTP.pm
Log:
Lets the data hook handle missing envelope sender/recipient,
then falls back to the builtin 503 response (Brian Gross)
Revision Changes Path
1.49 +3 -6 qpsmtpd/lib/Qpsmtpd/SMTP.pm
Index: SMTP.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- SMTP.pm 28 Jan 2005 03:30:50 -0000 1.48
+++ SMTP.pm 30 Jan 2005 17:40:11 -0000 1.49
@@ -389,9 +389,6 @@
sub data {
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");
if ($rc == DONE) {
return 1;
@@ -416,9 +413,9 @@
$self->disconnect;
return 1;
}
- else {
- $self->respond(354, "go ahead");
- }
+ $self->respond(503, "MAIL first"), return 1 unless $self->transaction->sender;
+ $self->respond(503, "RCPT first"), return 1 unless $self->transaction->recipients;
+ $self->respond(354, "go ahead");
my $buffer = '';
my $size = 0;