On Wed, April 30, 2014 11:23 am, Wietse Venema wrote: > Nerijus Kislauskas: >> Hi, >> >> Does this From: header of default bounce message in postfix conforms to >> RFC2822, RFC5322 or RFC6854?: >> >> From: mailer-dae...@mx-1.ktu.lt (Mail Delivery System) >> >> >> I'm using postfix 2.7.1. As I can see 2.11 is not much different. There >> are a lot of libraries, like >> >> http://search.cpan.org/~rjbs/Email-Address-1.903/lib/Email/Address.pm >> >> in the wild, which doesn't correctly parse such From: header. Thanks for >> answers. > > RFC822 comments (text inside parentheses) were defined in 1982. > That's more than 30 years ago! I recommend that you use better > software.
Parses just fine for me: $ perl -e 'use Email::Address; print "$Email::Address::VERSION\n"; my @addrs = Email::Address->parse(q[From: mailer-dae...@mx-1.ktu.lt (Mail Delivery System)]); print scalar(@addrs), " address(es) found\n"; print "{", join("}{", $_->original, $_->phrase, $_->address, $_->comment),"}\n" foreach @addrs;' 1.892 1 address(es) found { mailer-dae...@mx-1.ktu.lt (Mail Delivery System)}{}{mailer-dae...@mx-1.ktu.lt}{(Mail Delivery System)}