Richard Whittaker wrote:
Actually, I figured out a means of using the IMAP/Folder method, and itWhat I've recently done is made two IMAP folders called "Spam/LearnSpam" and "Spam/LearnHam". I've got all autolearning turned OFF since, if the normal rules give a false-negative or a false-positive, then I suspect that the Bayes component will start to re-inforce it. In other words, it would just "amplify" the scores being given by the other rules, in a sense.
works great, and doesn't require much care and feeding by me (which is
really what mattered!)...
So, once I've got those two folders for my trash, I drag all ham/spam from my inbox into the appropriate folders. Then, every hour, I have a script run (which I'll include at the end of this). Basically, what the script does is take everything from LearnSpam and runs "sa-learn --spam" on it and does the same kinda deal with LearnHam.
One additional thing that it does is it grabs the spam-score from each message and writes it to a spamlog file (along with whether it found it in the spam-trash or the good-trash). This way, I can do a "sort -n" on the file and immediate tell:
1 - If there's *any* overlap between the scores on the spam and the ham. If there's overlap, then there's no way to eliminate false-positives AND false-negatives without modifying the rules or the having the bayes db learn more.
2 - If there is *no* overlap, then it tells you how big of a gap you have between your lowest-scored spam and your highest-scored ham. The idea here is that you could set your required_hits to be right in the middle of this gap.
- Joe
--- learnspam.sh ---
#!/bin/sh
MAILDIR="$HOME/Maildir" HAMDIR="$MAILDIR/.Spam.LearnHam" SPAMDIR="$MAILDIR/.Spam.LearnSpam" SPAMLOG="$HOME/spamlog"
record() {
score=`cat "$2" | perl -ne 'print if(s/^X-Spam-Status: .*hits=([-.0-9]+) required.*/$1/);' | head -1`
if [ -n "$score" ]
then
echo "$score : $1" >> "$SPAMLOG"
fi
rm "$2"
}
for name in `find "$SPAMDIR" -type f -name "*,S=*"` do sa-learn --spam "$name" record "SPAM" "$name" done
for name in `find "$HAMDIR" -type f -name "*,S=*"` do sa-learn --ham "$name" record "GOOD" "$name" done
smime.p7s
Description: S/MIME Cryptographic Signature
