From: Eric Wong Date: Mon, 28 Oct 2019 10:45:23 +0000 (+0000) Subject: mda: skip MIME parsing if spam X-Git-Tag: v1.2.0~14^2~4 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=1d9317540bc3fea86dcd512bb54275324ed1b0fa mda: skip MIME parsing if spam We don't want to waste cycles parsing the message for MIME bits if it's spam. --- 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 ($) {