-# Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2013-2018 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
#
# For the -mda script (mail delivery agent)
package PublicInbox::MDA;
} @address;
foreach my $line ($simple->header('Cc'), $simple->header('To')) {
- my @addrs = ($line =~ /([^<\s]+\@[^>\s]+)/g);
+ my @addrs = ($line =~ /([^,<\s]+\@[^,>\s]+)/g);
foreach my $addr (@addrs) {
if ($ok{lc(__drop_plus($addr))}) {
return 1;
my ($class, $simple, $dst) = @_;
unless (defined $simple->header('List-Id')) {
my $pa = $dst->{-primary_address};
- $simple->header_set("List-Id", "<$pa>"); # RFC2919
+ $pa =~ tr/@/./; # RFC2919
+ $simple->header_set("List-Id", "<$pa>");
}
-
- $simple->header_set($_) foreach @BAD_HEADERS;
}
1;