Subject: | Mail::Address fail to parse rfc822 multiple mailboxes names |
Hi,
in rfc 822 [1], chapter 6.2.6, it is specified that an address can be a
"pseudo" group address like 'name:;'
If you parse such address with Mail::Address->parse, it removes the
ending ";" which is really important because this is what is used by the
MTA to understand this as a pseudo address and to not send mail to it.
The following sample code triggers this bug:
-----snip-----
#!/usr/bin/perl -w
use strict;
use Mail::Address;
my $header = '"AdminCc of example.com Ticket #6":;';
my @addresses = Mail::Address->parse($header);
foreach my $addr (@addresses) {
print $addr->address."\n";
}
-----snip-----
Print:
"AdminCc of example.com Ticket #6":
but should print:
"AdminCc of example.com Ticket #6":;
The attached patch makes it working, but I didn't enough understood the
parsing code to say that this is the true fix, so please do your analyze
and own fix ;)
Thanks for your help :)
[1] http://www.faqs.org/rfcs/rfc822.html