]> git.donarmstrong.com Git - bin.git/commitdiff
add recheck spam
authorDon Armstrong <don@donarmstrong.com>
Fri, 21 Feb 2014 19:10:34 +0000 (11:10 -0800)
committerDon Armstrong <don@donarmstrong.com>
Fri, 21 Feb 2014 19:10:34 +0000 (11:10 -0800)
recheck_spam [new file with mode: 0755]

diff --git a/recheck_spam b/recheck_spam
new file mode 100755 (executable)
index 0000000..fa08029
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# these are for non-spamc setups
+SPAM_REPORT="spamassassin --report"
+HAM_REPORT="spamassassin --revoke"
+SPAM_CHECK="spamassassin -e"
+
+# these are for spamc
+SPAM_REPORT="spamc --learntype=spam"
+HAM_REPORT="spamc --learntype=ham"
+SPAM_CHECK="spamc -c"
+
+for file in "$@"; do
+    spamc < "$file" |sponge "$file" 2>/dev/null;
+done;