about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-20 19:50:03 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-20 19:52:30 +0000
commitbaae46ba22d283706dd821bea19aa9d985d0081d (patch)
tree27401e3e1afbcb0079e25f5e9c49864301d3e8eb /lib/PublicInbox/Import.pm
parent70207d974c5a965ef849b58c27b63fd644b3293e (diff)
Reduce the places where we have duplicate logic for discarding
unwanted headers.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
1 files changed, 2 insertions, 0 deletions
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) {