PublicInbox::MboxReader->(mboxrd|mboxo) only deletes the last
trailing newline, not every single trailing newline like
InboxWritable->import_mbox does.
Testing PublicInbox::MboxReader->mboxrd (next commit) with
scripts/import_vger_from_mbox on the LKML archive I got 2018 for
v2 development; this difference was responsible for a single
spam message(*) from out of
2722831 not being filtered correctly
and returning a different result.
(*) dated 2014-08-25
# the vger appender seems to only work on the raw string,
# so in multipart (e.g. GPG-signed) messages, the list trailer
# becomes invisible to MIME-aware email clients.
- if ($s =~ s/$l0\n$l1\n$l2\n$l3\n($l4\n)?\z//os) {
+ if ($s =~ s/$l0\n$l1\n$l2\n$l3\n(?:$l4\n)?\n*\z//os) {
$mime = PublicInbox::Eml->new(\$s);
}
$self->ACCEPT($mime);