X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/0cedb2f205d3552104ef3f7edc1d0640fedbd4ff..90813e3aadae850602b792360ac8b7987f857c9b:/procmail/spamfilter diff --git a/procmail/spamfilter b/procmail/spamfilter index 9e88642..80d59cf 100755 --- a/procmail/spamfilter +++ b/procmail/spamfilter @@ -46,6 +46,14 @@ PMDIR=${PMDIR:-$HOME/.etc/mailfilter/procmail} { LOG="spamfilter: skipping resubmitted message$NL" } } +# do not run spamfilters if the message destination is already set +:0 E +* DEST ?? . +{ + LOG="spamfilter: message already routed to '$DEST'$NL" + SPAM_UNKNOWN=already-destined +} + # let earlier parts of the mailfilter cause bypassing the checks :0 E * SKIP_SPAMCHECKS ?? . @@ -81,6 +89,8 @@ PMDIR=${PMDIR:-$HOME/.etc/mailfilter/procmail} # now run the spamfilters :0 E { + INCLUDERC=$PMDIR/spamtraps + INCLUDERC=$PMDIR/spammers INCLUDERC=$PMDIR/pre-spam-cleanup # crm114 @@ -89,6 +99,7 @@ PMDIR=${PMDIR:-$HOME/.etc/mailfilter/procmail} :0 * !SKIP_CRM ?? . { + #TODO: somehow filter out headers we added :0 fw |$CRM114