about summary refs log tree commit homepage
path: root/public-inbox-mda
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-06-05 17:45:26 +0000
committerEric Wong <e@80x24.org>2015-06-05 17:45:26 +0000
commit23a51954b6bc4d75fe8d157b60b07ffd24a2f4e1 (patch)
tree0805c51ff7928e48023ba042d265c1f70f914d86 /public-inbox-mda
parentc2cf793143aaefde5b12d3a6909c5097fda76228 (diff)
downloadpublic-inbox-23a51954b6bc4d75fe8d157b60b07ffd24a2f4e1.tar.gz
We want to be able to prioritize spam downstream to check for
borderline cases.
Diffstat (limited to 'public-inbox-mda')
-rwxr-xr-xpublic-inbox-mda8
1 files changed, 8 insertions, 0 deletions
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