From 1d9317540bc3fea86dcd512bb54275324ed1b0fa Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Oct 2019 10:45:23 +0000 Subject: mda: skip MIME parsing if spam We don't want to waste cycles parsing the message for MIME bits if it's spam. --- script/public-inbox-mda | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script') diff --git a/script/public-inbox-mda b/script/public-inbox-mda index 71c5d937..69354616 100755 --- a/script/public-inbox-mda +++ b/script/public-inbox-mda @@ -71,9 +71,9 @@ if ($spamc) { my $fh = $emm->fh; read($fh, $str, -s $fh); } +do_exit(0) unless $spam_ok; my $mime = PublicInbox::MIME->new(\$str); -do_exit(0) unless $spam_ok; # -mda defaults to the strict base filter which we won't use anywhere else sub mda_filter_adjust ($) { -- cgit v1.2.3-24-ge0c7