]> Sergey Matveev's repositories - public-inbox.git/commitdiff
eml: decode Bcc, and Resent-* address variants
authorEric Wong <e@80x24.org>
Tue, 16 Mar 2021 10:28:50 +0000 (16:28 +0600)
committerEric Wong <e@80x24.org>
Tue, 16 Mar 2021 19:47:44 +0000 (15:47 -0400)
This is closer to matching RFC 8621 section 4.1.2.3,
though we don't support the "Any header field not defined in
RFC5322 or RFC2369" rule, since that could get tricky...

lib/PublicInbox/Eml.pm

index 0697c3a50babd4a328a64905e7af07474d6b0afa..46c273cea3ebcd726a9b7cde331cac1514fbc961 100644 (file)
@@ -51,7 +51,9 @@ $MIME_ENC{quotedprint} = $MIME_ENC{'quoted-printable'} = $MIME_ENC{qp};
 $MIME_DEC{quotedprint} = $MIME_DEC{'quoted-printable'} = $MIME_DEC{qp};
 $MIME_ENC{$_} = \&identity_codec for qw(7bit 8bit binary);
 
-my %DECODE_ADDRESS = map { $_ => 1 } qw(From To Cc Sender Reply-To);
+my %DECODE_ADDRESS = map {
+       ($_ => 1, "Resent-$_" => 1)
+} qw(From To Cc Sender Reply-To Bcc);
 my %DECODE_FULL = (
        Subject => 1,
        'Content-Description' => 1,