]> git.donarmstrong.com Git - bin.git/blobdiff - learn_from_spam
use spamassassin --local reporting if listid
[bin.git] / learn_from_spam
index a6cac9306f43f953e87a1592bdf37e6b6530e884..63cb9f8789b1fa4f32934bb2942ce6d97c490a76 100755 (executable)
@@ -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