# New Ticket Created by Hanno Hecker
# Please include the string: [perl #38746]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38746 >
When parsing a non RFC 2821 compliant address, such as
<[EMAIL PROTECTED]> or <[EMAIL PROTECTED]> the resulting address is <>.
This may lead to an empty rcpt address or a null sender (<>).
The attached patch fixes this (patch by Peter J. Holzer).
--- ../0.3x/lib/Qpsmtpd/Address.pm 2006-03-04 08:36:21.000000000 +0100
+++ lib/Qpsmtpd/Address.pm 2006-03-06 08:58:06.000000000 +0100
@@ -60,7 +60,8 @@
my ($class, $user, $host) = @_;
my $self = {};
if ($user =~ /^<(.*)>$/ ) {
- ($user, $host) = $class->canonify($user)
+ ($user, $host) = $class->canonify($user);
+ return undef unless defined $user;
}
elsif ( not defined $host ) {
my $address = $user;