From baae46ba22d283706dd821bea19aa9d985d0081d Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Tue, 20 Mar 2018 19:50:03 +0000 Subject: import: discard all the same headers as MDA Reduce the places where we have duplicate logic for discarding unwanted headers. --- lib/PublicInbox/Import.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index fc740fa4..e50f1156 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -13,6 +13,7 @@ use PublicInbox::MID qw(mids mid_mime mid2path); use PublicInbox::Address; use PublicInbox::MsgTime qw(msg_timestamp); use PublicInbox::ContentId qw(content_digest); +use PublicInbox::MDA; sub new { my ($class, $git, $name, $email, $ibx) = @_; @@ -319,6 +320,7 @@ sub add { # kill potentially confusing/misleading headers $mime->header_set($_) for qw(bytes lines content-length status); + $mime->header_set($_) for @PublicInbox::MDA::BAD_HEADERS; # spam check: if ($check_cb) { -- cgit v1.2.3-24-ge0c7