lib/PublicInbox/Import.pm | 2 ++ lib/PublicInbox/MDA.pm | 2 -- lib/PublicInbox/WatchMaildir.pm | 1 - diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index fc740fa451c9d7ad19da99c1dc0a5490358674ae..e50f1156ca37380eaaa419d40599fb1fd347c0f6 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 @@ } # 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) { diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm index d5af8f94081d3ab3f73d7403ca42f035e3f6b7de..637404eb2e553712b62df8db85ce7f159a56d73a 100644 --- a/lib/PublicInbox/MDA.pm +++ b/lib/PublicInbox/MDA.pm @@ -81,8 +81,6 @@ my $pa = $dst->{-primary_address}; $pa =~ tr/@/./; # RFC2919 $simple->header_set("List-Id", "<$pa>"); } - - $simple->header_set($_) foreach @BAD_HEADERS; } 1; diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index b165a6032000a091125bcecf31b24278306d744d..d3ca2a16d75e6a81df3422a60f467cc7203a5b90 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -159,7 +159,6 @@ return _remove_spam($self, $path); } my $im = _importer_for($self, $inbox); my $mime = _path_to_mime($path) or return; - $mime->header_set($_) foreach @PublicInbox::MDA::BAD_HEADERS; my $wm = $inbox->{-watchheader}; if ($wm) { my $v = $mime->header_obj->header_raw($wm->[0]);