<<< Date Index >>>     <<< Thread Index >>>

Re: 3 Mutt binds for SpamAssassin, if anyone is looking ;)



On Sat, Feb 21, 2004 at 11:13:45AM -0500, Stephen <kru_tch@xxxxxxxx> wrote:
> I found this script for one's muttrc, in the spamassassin directory,
> after installing it. I trust this meets your requirement, and it's
> considerably less lines than what you have, and as near as I can tell,
> does the same thing. FWIW;
>       # spamassassin report and classify as spam
>       macro index S "|/usr/bin/spamassassin -r"
>       # spamassassin classify as ham
>       macro index H "|/usr/bin/sa-learn --ham  --no-rebuild --single"
>       # rebuild the spamassassin bayes filter db
>       macro index R "!/usr/bin/sa-learn --rebuild"

I did this for a while (except I built the rebuild into the end of my S
and M (corresponding to your H) macros), but found it to be really slow.
I replaced it with the following:

macro index S "C=spamtrain\n!spamtrain\n"
macro index M "C=mailtrain\n!mailtrain\n"

where the spamtrain command is

#!/bin/sh
sa-learn --mbox ~/Mail/spamtrain --spam
cat /dev/null > ~/Mail/spamtrain

and mailtrain is

#!/bin/sh
sa-learn --mbox ~/Mail/mailtrain --ham
cat /dev/null > ~/Mail/mailtrain

When tagging a hundred spam and training on them, it's far faster, from
not having to start perl every time, I guess.

-Daniel

-- 
Daniel E. Eisenbud
eisenbud@xxxxxxxxxxxxxx
Computational Biology Center
Memorial Sloan-Kettering Cancer Center