diff --git a/Changes b/Changes index 7d51283..9c19bb2 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,15 @@ +2002/09/20 + Avoid "use of uninitialized variable" warning when the "MAIL" or the + "RCPT" command is executed without a parameter. + + Compatibility with perl 5.5.3. + + 2002/09/12 Fix "Could not print" error message in the TcpServer object. (Thanks to Ross Mueller ) + 2002/09/10 dnsbl plugin queues lookups in the background upon connect but doesn't block for the results until they are needed, greatly diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 23624aa..14c8900 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -157,7 +157,7 @@ sub ehlo { sub mail { my $self = shift; - return $self->respond(501, "syntax error in parameters") if $_[0] !~ m/^from:/i; + return $self->respond(501, "syntax error in parameters") if !$_[0] or $_[0] !~ m/^from:/i; # -> from RFC2821 # The MAIL command (or the obsolete SEND, SOML, or SAML commands) @@ -219,7 +219,7 @@ sub mail { sub rcpt { 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] and $_[0] =~ m/^to:/i; return $self->respond(503, "Use MAIL before RCPT") unless $self->transaction->sender; my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0];