summaryrefslogtreecommitdiff
path: root/tools/mail-zap
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-17 14:02:45 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-17 15:07:12 (GMT)
commitd0fa5d6b32ee1d2ea0b29b73dd33eae29bf223c7 (patch)
treecbbbf34a27acec4a32151902bc174b6da2385368 /tools/mail-zap
parent66ade4b4d9c74fbe40981015cbbb98f2b3320c31 (diff)
remove bad stuff from mailbox, sa-learn it, move it to ../spam/
Diffstat (limited to 'tools/mail-zap')
-rwxr-xr-xtools/mail-zap13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/mail-zap b/tools/mail-zap
new file mode 100755
index 0000000..912d740
--- /dev/null
+++ b/tools/mail-zap
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+if test -z "$*" ; then
+ exit
+fi
+
+mail-scan +subject "$@"
+
+sa-learn --spam "$@"
+
+for file in "$@" ; do
+ mv "$file" "$(dirname $file)/../spam/"
+done