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:
parent
8b50f9f0dd
commit
0449fbfb50
@ -63,7 +63,7 @@ sub parse {
|
|||||||
return (OK) unless defined $line; # trivial case
|
return (OK) unless defined $line; # trivial case
|
||||||
my $self = {};
|
my $self = {};
|
||||||
bless $self, $me;
|
bless $self, $me;
|
||||||
$cmd = lc $1;
|
$cmd = lc $cmd;
|
||||||
if ($sub and (ref($sub) eq 'CODE')) {
|
if ($sub and (ref($sub) eq 'CODE')) {
|
||||||
my @ret = eval { $sub->($self, $cmd, $line); };
|
my @ret = eval { $sub->($self, $cmd, $line); };
|
||||||
if ($@) {
|
if ($@) {
|
||||||
@ -99,6 +99,7 @@ sub parse_rcpt {
|
|||||||
sub parse_mail {
|
sub parse_mail {
|
||||||
my ($self,$cmd,$line) = @_;
|
my ($self,$cmd,$line) = @_;
|
||||||
return (DENY, "Syntax error in command") unless $line =~ s/^from:\s*//i;
|
return (DENY, "Syntax error in command") unless $line =~ s/^from:\s*//i;
|
||||||
|
print "parse_mail: $line\n";
|
||||||
return &_get_mail_params($cmd, $line);
|
return &_get_mail_params($cmd, $line);
|
||||||
}
|
}
|
||||||
### RFC 1869:
|
### RFC 1869:
|
||||||
|
Loading…
Reference in New Issue
Block a user