]> git.donarmstrong.com Git - bin.git/commitdiff
add learn from ham and learn from spam
authorDon Armstrong <don@donarmstrong.com>
Wed, 12 Feb 2014 17:15:47 +0000 (09:15 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 12 Feb 2014 17:15:47 +0000 (09:15 -0800)
learn_from_ham [new symlink]
learn_from_spam [new file with mode: 0755]

diff --git a/learn_from_ham b/learn_from_ham
new file mode 120000 (symlink)
index 0000000..6c4a60a
--- /dev/null
@@ -0,0 +1 @@
+learn_from_spam
\ No newline at end of file
diff --git a/learn_from_spam b/learn_from_spam
new file mode 100755 (executable)
index 0000000..92615ba
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ $0 eq "learn_from_spam" ]; then 
+    for file in "$@"; do
+        spamassassin -r < "$file";
+        spamassassin -R < "$file";
+    done;
+elif [ $0 == "learn_from_ham" ]; then
+    for file in "$@"; do
+        spamassassin -k < "$file";
+        spamassassin -W < "$file";
+    done;
+fi;