> Unfortunately, it looks like Mail::Address doesn't use angle
> brackets in the format when the address is empty, even if
> there's a phrase. So it's not clear what the proper way to
> represent an empty address is.
Ugh. It looks like the way Mail::Address::format() uses it, new('','') is
most correct. New('<>') is definitely incorrect, though new('') will work.
So, revised patch follows...
Brian
diff -u qpsmtpd-cvs/lib/Qpsmtpd/SMTP.pm-orig qpsmtpd-cvs/lib/Qpsmtpd/SMTP.pm
--- qpsmtpd-cvs/lib/Qpsmtpd/SMTP.pm-orig Sun Nov 23 17:02:15 2003
+++ qpsmtpd-cvs/lib/Qpsmtpd/SMTP.pm Tue Nov 25 04:53:07 2003
@@ -209,7 +209,7 @@
my ($from) = ($from_parameter =~ m/^from:\s*(\S+)/i)[0];
warn "$$ from email address : [$from]\n";
if ($from eq "<>" or $from =~ m/\[undefined\]/) {
- $from = Mail::Address->new("<>");
+ $from = Mail::Address->new('','');
}
else {
$from = (Mail::Address->parse($from))[0];