take out spurious warning
improve address parsing a bit to make it easier to add parsing of MAIL FROM extensions git-svn-id: https://svn.perl.org/qpsmtpd/trunk@263 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
db15fbf9ad
commit
86c887fd59
@ -226,8 +226,13 @@ sub mail {
|
|||||||
else {
|
else {
|
||||||
my $from_parameter = join " ", @_;
|
my $from_parameter = join " ", @_;
|
||||||
$self->log(LOGINFO, "full from_parameter: $from_parameter");
|
$self->log(LOGINFO, "full from_parameter: $from_parameter");
|
||||||
my ($from) = ($from_parameter =~ m/^from:\s*(\S+)/i)[0];
|
|
||||||
warn "$$ from email address : [$from]\n";
|
my ($from) = ($from_parameter =~ m/^from:\s*(<[^>]+>)/i)[0];
|
||||||
|
|
||||||
|
# support addresses without <> ... maybe we shouldn't?
|
||||||
|
($from) = "<" . ($from_parameter =~ m/^from:\s*(\S+)/i)[0] . ">"
|
||||||
|
unless $from;
|
||||||
|
|
||||||
if ($from eq "<>" or $from =~ m/\[undefined\]/) {
|
if ($from eq "<>" or $from =~ m/\[undefined\]/) {
|
||||||
$from = Qpsmtpd::Address->new("<>");
|
$from = Qpsmtpd::Address->new("<>");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user