Reduce the places where we have duplicate logic for discarding
unwanted headers.
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) = @_;
# 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) {
$pa =~ tr/@/./; # RFC2919
$simple->header_set("List-Id", "<$pa>");
}
-
- $simple->header_set($_) foreach @BAD_HEADERS;
}
1;
}
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]);