From e7e46da278e030f03cfff66dcc25491a746b6758 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 17 Oct 2017 10:36:23 -0700 Subject: [PATCH] use spamassassin --local reporting if listid --- learn_from_spam | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/learn_from_spam b/learn_from_spam index a6cac93..63cb9f8 100755 --- a/learn_from_spam +++ b/learn_from_spam @@ -18,7 +18,9 @@ if [ "$(basename $0)" = "learn_from_spam" ]; then for file in "$@"; do if ! formail -c < "$file"|grep -q '^List-Id'; then $SPAM_REPORT < "$file" >/dev/null 2>&1; - fi; + else + spamasssin --local --report < "$file" >/dev/null 2>&1; + fi formail -c < "$file" | grep -e '^From ' -e 'From: ' | spamassassin --add-to-blacklist >/dev/null 2>&1; formail -c < "$file" | grep -e '^From ' -e 'From: ' | spamassassin --remove-from-whitelist >/dev/null 2>&1; # check to see if it's still ham -- 2.39.2