1 |
#!/usr/local/bin/bash |
2 |
# Spam Update |
3 |
# |
4 |
# Douglas Thrift |
5 |
# |
6 |
# $Id$ |
7 |
|
8 |
learn='/usr/local/bin/spamassassin' |
9 |
spam="$HOME/.imap_mail/Spam" |
10 |
negative='False Negative' |
11 |
positive='False Positive' |
12 |
format='mbx' |
13 |
now="`/bin/date +%d-%b-%Y`" |
14 |
mailutil='/usr/local/bin/mailutil' |
15 |
sed='/usr/bin/sed' |
16 |
|
17 |
echo -n "Learning and reporting from $negative mailbox: |
18 |
" |
19 |
|
20 |
$learn --report --$format --remove-from-whitelist "$spam/$negative" |
21 |
|
22 |
echo -n " |
23 |
Learning and revoking from $positive mailbox: |
24 |
" |
25 |
|
26 |
$learn --revoke --$format --add-to-whitelist "$spam/$positive" |
27 |
|
28 |
echo -n " |
29 |
Information: |
30 |
If you receive Spam in your Inbox mailbox, copy it to the $negative mailbox. |
31 |
|
32 |
If you receive mail that is not Spam in your Assassin mailbox, copy it to the $positive mailbox. |
33 |
|
34 |
Pruning old messages from $negative mailbox: |
35 |
" |
36 |
|
37 |
$mailutil prune "Spam/$negative" "BEFORE $now" | $sed -e '$ s/$/./' |
38 |
|
39 |
echo -n " |
40 |
Pruning old messages from $positive mailbox: |
41 |
" |
42 |
|
43 |
$mailutil prune "Spam/$positive" "BEFORE $now" | $sed -e '$ s/$/./' |