X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=learn_from_spam;h=63cb9f8789b1fa4f32934bb2942ce6d97c490a76;hb=4d311bdcfff048e28e49869141d3725c1ab7e249;hp=2535f8c2a8aab57fa2e9f5a246ec20c36cb23607;hpb=3fb6cd93b262121dfa2c0a84c032b01b66836b05;p=bin.git diff --git a/learn_from_spam b/learn_from_spam index 2535f8c..63cb9f8 100755 --- a/learn_from_spam +++ b/learn_from_spam @@ -6,8 +6,8 @@ HAM_REPORT="spamassassin --revoke" SPAM_CHECK="spamassassin -e" # these are for spamc -SPAM_REPORT="spamc --learntype=spam" -HAM_REPORT="spamc --learntype=ham" +SPAM_REPORT="spamc --learntype=spam -s $((100 * 1024 * 1024))" +HAM_REPORT="spamc --learntype=ham -s $((100 * 1024 * 1024))" SPAM_CHECK="spamc -s $((100 * 1024 * 1024)) -c" # needs rules directories @@ -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