It's possible to specify these headers multiple times, and
PublicInbox::MDA->precheck takes that into account, so
-learn should, too.
---
 script/public-inbox-learn | 8 +++++---
 1 file 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;
+               }
        }
 }
 
--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/

Reply via email to