diff options
author | Eric Wong <e@80x24.org> | 2019-10-28 10:45:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-10-30 08:49:39 +0000 |
commit | 74a3206babe0572a1494500d21267a31873af7b0 (patch) | |
tree | bbc5e00d25a50e85ccc30716ac8e6f728d6a8e53 /t/mda.t | |
parent | 4315455300e29e4ef0ea2f2d68bf4e86d261ae1d (diff) | |
download | public-inbox-74a3206babe0572a1494500d21267a31873af7b0.tar.gz |
While it's not RFC2919-conformant, mail software can theoretically set multiple List-ID headers. Deliver to all inboxes which match a given List-ID since that's likely the intended. Cc: Eric W. Biederman <ebiederm@xmission.com> Link: https://public-inbox.org/meta/87pniltscf.fsf@x220.int.ebiederm.org/
Diffstat (limited to 't/mda.t')
-rw-r--r-- | t/mda.t | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -308,6 +308,25 @@ EOF my $cur = `git --git-dir=$maindir diff HEAD~1..HEAD`; like($cur, qr/this message would not be accepted without --no-precheck/, '--no-precheck delivered message anyways'); + + # try a message with multiple List-ID headers + $in = <<EOF; +List-ID: <foo.bar> +List-ID: <$list_id> +Message-ID: <2lids\@example> +Subject: two List-IDs +From: user <user\@example.com> +To: $addr +Date: Fri, 02 Oct 1993 00:00:00 +0000 + +EOF + ($out, $err) = ('', ''); + IPC::Run::run([$mda], \$in, \$out, \$err); + is($?, 0, 'mda OK with multiple List-Id matches'); + $cur = `git --git-dir=$maindir diff HEAD~1..HEAD`; + like($cur, qr/Message-ID: <2lids\@example>/, + 'multi List-ID match delivered'); + like($err, qr/multiple List-ID/, 'warned about multiple List-ID'); } done_testing(); |