diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-29 09:57:45 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-29 09:59:55 +0000 |
commit | 9aaf9cf73f7b126ad3d2726adf7c764630626d67 (patch) | |
tree | a34658235bfc1559404004d7cbb0d2c693fd600d /lib | |
parent | 6efc0df8d3e00da0257b131e96f74d18fce290ab (diff) | |
download | public-inbox-9aaf9cf73f7b126ad3d2726adf7c764630626d67.tar.gz |
The original Message-ID is still the most important when discussing with other recipients who do not rely on a message flowing through public-inbox. So whatever Message-ID we use to deduplicate internally will be secondary and less important. All of our front-end v2 code is order-independent, so we won't let the message count against us, that way.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Import.pm | 8 | ||||
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 6824faca..e07eddab 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -297,12 +297,12 @@ sub drop_unwanted_headers ($) { } # used by V2Writable, too -sub prepend_mid ($$) { +sub append_mid ($$) { my ($hdr, $mid0) = @_; # @cur is likely empty if we need to call this sub, but it could # have random unparseable crap which we'll preserve, too. - my @cur = $hdr->header_raw('Message-Id'); - $hdr->header_set('Message-Id', "<$mid0>", @cur); + my @cur = $hdr->header_raw('Message-ID'); + $hdr->header_set('Message-ID', @cur, "<$mid0>"); } sub v1_mid0 ($) { @@ -312,7 +312,7 @@ sub v1_mid0 ($) { if (!scalar(@$mids)) { # spam often has no Message-Id my $mid0 = digest2mid(content_digest($mime)); - prepend_mid($hdr, $mid0); + append_mid($hdr, $mid0); return $mid0; } $mids->[0]; diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 01ec98ac..9b280c68 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -173,7 +173,7 @@ sub num_for_harder { $num = $self->{skel}->{mm}->mid_insert($$mid0); } } - PublicInbox::Import::prepend_mid($hdr, $$mid0); + PublicInbox::Import::append_mid($hdr, $$mid0); $num; } |