From 23a51954b6bc4d75fe8d157b60b07ffd24a2f4e1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 5 Jun 2015 17:45:26 +0000 Subject: public-inbox-mda: preserve SpamAssassin headers in spam We want to be able to prioritize spam downstream to check for borderline cases. --- public-inbox-mda | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'public-inbox-mda') diff --git a/public-inbox-mda b/public-inbox-mda index 522eeff7..047a4827 100755 --- a/public-inbox-mda +++ b/public-inbox-mda @@ -56,6 +56,14 @@ if (PublicInbox::MDA->precheck($filter, $dst->{address}) && $filter->pipe(PublicInbox::MDA->cmd, $main_repo); } } +} else { + # Ensure emergency spam gets spamassassin headers. + # This makes it easier to prioritize obvious spam from less obvious + if (defined($filtered) && length($filtered)) { + my $drop = Email::MIME->new(\$filtered); + $filtered = undef; + $filter->simple($drop); + } } exit 0; # goes to emergency -- cgit v1.2.3-24-ge0c7