diff options
author | Eric Wong <e@80x24.org> | 2019-10-28 10:45:15 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-10-30 08:48:06 +0000 |
commit | 83470f5e60e44d7f70b378f4b250c6584f42f64e (patch) | |
tree | f71e25be7580fde4db5975425fba89f912e427bb | |
parent | f9fc5cf2e8cefda4a56d937ed217e47689fd7e49 (diff) | |
download | public-inbox-83470f5e60e44d7f70b378f4b250c6584f42f64e.tar.gz |
It's possible to specify these headers multiple times, and PublicInbox::MDA->precheck takes that into account, so -learn should, too.
-rwxr-xr-x | script/public-inbox-learn | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn index c4c4d4b9..8ff1652b 100755 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -42,9 +42,11 @@ my $mime = PublicInbox::MIME->new(eval { # get all recipients my %dests; foreach my $h (qw(Cc To)) { - my $val = $mime->header($h) or next; - foreach my $email (PublicInbox::Address::emails($val)) { - $dests{lc($email)} = 1; + my @val = $mime->header($h) or next; + for (@val) { + foreach my $email (PublicInbox::Address::emails($_)) { + $dests{lc($email)} = 1; + } } } |