From 9aaf9cf73f7b126ad3d2726adf7c764630626d67 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Thu, 29 Mar 2018 09:57:45 +0000 Subject: v2writable: append, instead of prepending generated Message-ID 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. --- lib/PublicInbox/Import.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/Import.pm') 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]; -- cgit v1.2.3-24-ge0c7