summaryrefslogtreecommitdiffstats
path: root/bin/learn_spam
blob: f013fc24b57a154dd9e34e578cdeecf314aca572 (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/bash

MAILDIR=~/Mail

echo -n "Learning spam..."
find ${MAILDIR} -mindepth 1 -type d -iname '*spam*' -exec echo \; -exec echo "  From directory" {} \; -exec sa-learn --showdots --spam {}/* \;

echo -n "Learning ham..."
find ${MAILDIR} -mindepth 1 -type d ! -iname '*spam*' ! -iname '*inbox*' ! -iname '*sent*' ! -iname '*trash*' ! -iname '*draft*' ! -iname '*school mail*' -exec echo \; -exec echo "  From directory" {} \; -exec sa-learn --showdots --ham {}/* \;