Skip Menu |

This queue is for tickets about the Net-Server-Mail CPAN distribution.

Report information
The Basics
Id: 77516
Status: open
Priority: 0/
Queue: Net-Server-Mail

People
Owner: Nobody in particular
Requestors: rene.schickbauer [...] magnapowertrain.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.18
Fixed in: (no value)



Subject: Adress parsing failure in MAIL FROM and RCPT TO
Hi! In Version 0.18, adress parsing in the MAIL FROM command fails if the mail address is NOT encased in <> While the new version handles RFC6409 better, this update seems to break quite a few older clients. I attached a patch that should fix handling of all kinds of "MAIL FROM:" and "RCPT TO:" formats. LG Rene
Subject: mailfix.patch
diff -rupN Net-Server-Mail-0.18_orig/lib/Net/Server/Mail/SMTP.pm Net-Server-Mail-0.18/lib/Net/Server/Mail/SMTP.pm --- Net-Server-Mail-0.18_orig/lib/Net/Server/Mail/SMTP.pm 2012-05-13 12:03:52.000000000 +0200 +++ Net-Server-Mail-0.18/lib/Net/Server/Mail/SMTP.pm 2012-05-29 12:30:32.014081944 +0200 @@ -385,7 +385,16 @@ sub mail } my($address, $rest, @options); - unless (($address, $rest) = $args =~ /^<(.*?)>(?: (\S.*))?$/) { + if($args =~ /\ /) { + my @tmp = split/\ /, $args; + $address = shift @tmp; + $rest = join(' ', @tmp); + $address =~ s/^.*<//; + $address =~ s/>.*$//; + } else { + $address = $args; + } + if(!defined($address) || $address eq "") { $self->reply(501, 'Syntax error in parameters or arguments'); return; } @@ -441,7 +450,16 @@ sub rcpt } my($address, $rest, @options); - unless (($address, $rest) = $args =~ /^<(.*?)>(?: (\S.*))?$/) { + if($args =~ /\ /) { + my @tmp = split/\ /, $args; + $address = shift @tmp; + $rest = join(' ', @tmp); + $address =~ s/^.*<//; + $address =~ s/>.*$//; + } else { + $address = $args; + } + if(!defined($address) || $address eq "") { $self->reply(501, 'Syntax error in parameters or arguments'); return; }
On Tue May 29 06:34:27 2012, CAVAC wrote: Please contact the email address rene.schickbauer@magnapowertrain.com in case of any question.
RT-Send-CC: rene.schickbauer [...] magnapowertrain.com
Le Mar 29 Mai 2012 06:35:27, CAVAC a écrit : Show quoted text
> On Tue May 29 06:34:27 2012, CAVAC wrote: > > Please contact the email address rene.schickbauer@magnapowertrain.com in > case of any question.
Hi, "make test" fails with your patch.