[Spambayes] degeneration

Adam Hupp hupp at upl.cs.wisc.edu
Wed Jan 22 00:16:45 EST 2003


On Tue, Jan 21, 2003 at 09:20:34PM -0800, Neale Pickett wrote:
> 
> I'm going to go ahead and check in my new hammiefilter.py with big
> [EXPERIMENTAL] disclaimers by most of the options--I'm not sure they
> actually do what they say they do yet.
> 
> But the basic idea is to run "hammiefilter.py -t" from procmail, so that
> it trains on its decisions.  Then you can tweak it in your MUA by
> hitting some magic key which will pipe it to "hammiefilter.py -s -f" for
> spam incognito, and "hammiefilter.py -g -f" for false negatives.  The
> "-t" step inserts a header telling how it trained itself.  The "-s" and
> "-g" options, when they see that header, will untrain, then retrain.
> 
> So what we need is some sort of mutt magic (note: not "butt magic") to
> pipe a message out to something, then remove it, all in one keystroke.
> The pipe would look something like "hammiefilter.py -g -f | procmail".
> Or is there a more mutty way to do it?

It looks like your hammiefilter uses almost the same interface that
mine does, so the integration should be a snap.  Since I can't add and
modify arbitrary headers from within mutt (someone please correct me
if I'm wrong) I'm using one of the flags ("important" I believe) to
indicate an unsure in need of training.  

.procmailrc:

:0 fhb w:hammie
| /home/hupp/spambayes/hammiefilter.py --filter --train

:0:
* ^X-Hammie-Disposition: Yes
caughtspam

:0 fh w:
* ^X-Hammie-Disposition: Unsure
|formail -i "X-Status: F"


.muttrc:

folder-hook . "macro index F '|hammiefilter.py --reverse --train --good\n <save-message>=caughtspam\n'"
folder-hook . "macro pager F '|hammiefilter.py --reverse --train --good\n <save-message>=caughtspam\n'"
folder-hook caughtspam "macro index F '|hammiefilter.py --reverse --train --spam\r <save-message>!\r'"
folder-hook caughtspam "macro pager F '|hammiefilter.py --reverse --train --spam\r <save-message>!\r'"
macro pager H "|hammiefilter.py --train --good\r <clear-flag>!"
macro index H "|hammiefilter.py --train --good\r <clear-flag>!"
macro pager S "|hammiefilter.py --train --spam\r <clear-flag>!\r <save-message>=caughtspam\r"
macro index S "|hammiefilter.py --train --spam\r <clear-flag>!\r <save-message>=caughtspam\r"
color index red black "~h 'X-Hammie-Disposition: Unsure' ~F"


This puts messages scored as spam into the caughtspam folder.  If you
are in the caughtspam folder and type "F" (for false) it will untrain
as spam, retrain as ham, and move it to the mail spool.  If you are in
any other folder it does the opposite and moves into caughtspam.
Unsure messages show up as red in the index; "H" or "S" trains and
removes the flag.  I'm not positive the Unsure flagging works
entirely correctly, it's been a while.


> Yes, the desire to graduate does get strong at times, but eventually it
> always subsides.  I hope that for you it subsided because you actually
> graduated ;)

Today, actually.  Now I have time for more important matters such as
ridding my mailbox of spam.

-Adam



More information about the Spambayes mailing list