ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/Mail/SpamUpdate.sh
Revision: 824
Committed: 2006-07-04T17:21:43-07:00 (19 years ago) by douglas
Content type: text/x-sh
File size: 1163 byte(s)
Log Message:
Rearrange...

File Contents

# User Rev Content
1 douglas 809 #!/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     mailutil='/usr/local/bin/mailutil'
14     sed='/usr/bin/sed'
15 douglas 811 indent='s/^/ /'
16     period='s/[^.]$/&./'
17 douglas 809
18 douglas 811 echo "Information:
19     If you receive Spam in your Inbox mailbox, copy it to the $negative mailbox.
20 douglas 809
21 douglas 811 If you receive mail that is not Spam in your Assassin mailbox, copy it to the $positive mailbox.
22 douglas 809
23 douglas 811 Learning and reporting from $negative mailbox:"
24 douglas 809
25 douglas 815 $learn -rR --$format "$spam/$negative" | $sed -e "$indent" -e "$period"
26 douglas 809
27 douglas 811 echo "
28     Learning and revoking from $positive mailbox:"
29 douglas 809
30 douglas 815 $learn -kW --$format "$spam/$positive" | $sed -e "$indent" -e "$period"
31 douglas 809
32 douglas 811 echo "
33     Delivering messages from $positive mailbox:
34 douglas 824 $("`dirname $0`/FalsePositive.pl" 2>&1 | grep -c "^delivered to $HOME/.imap_mail/INBOX$") message(s) delivered."
35 douglas 809
36 douglas 824 #Pruning old messages from $negative mailbox:"
37 douglas 809
38 douglas 824 #$mailutil prune "Spam/$negative" 'ALL' | $sed -e "$indent" -e "$period"
39 douglas 809
40 douglas 824 #echo "
41     #Pruning old messages from $positive mailbox:"
42 douglas 811
43 douglas 824 #$mailutil prune "Spam/$positive" 'ALL' | $sed -e "$indent" -e "$period"

Properties

Name Value
svn:executable *
svn:keywords Id