Fix a showstopper of a bug in Command.pm which meant all commands would be parsed wrong

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@678 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2006-12-08 19:37:47 +00:00
parent 8b50f9f0dd
commit 0449fbfb50

View File

@ -63,7 +63,7 @@ sub parse {
return (OK) unless defined $line; # trivial case
my $self = {};
bless $self, $me;
$cmd = lc $1;
$cmd = lc $cmd;
if ($sub and (ref($sub) eq 'CODE')) {
my @ret = eval { $sub->($self, $cmd, $line); };
if ($@) {
@ -99,6 +99,7 @@ sub parse_rcpt {
sub parse_mail {
my ($self,$cmd,$line) = @_;
return (DENY, "Syntax error in command") unless $line =~ s/^from:\s*//i;
print "parse_mail: $line\n";
return &_get_mail_params($cmd, $line);
}
### RFC 1869: