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

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



On Sat, Feb 21, 2004 at 09:43:31AM +0200 or thereabouts, Ville Herva wrote:
> On Wed, Feb 18, 2004 at 04:04:27PM -0600, you [Andrei Bazhgin] wrote:
> > I was doing a lot of searching for Mutt macros for using the sa-learn 
> > program
> > that comes with SpamAssassin. I found some, but they are very simple and
> > incomplete. They do things right, but I came up with 3 macros that have some
> > more automation (no ``Press enter...'', etc.) 
> 
> I have pretty similar setup. See
> 
> http://article.gmane.org/gmane.mail.spam.spamassassin.general/41707
> 
> When flushing spam in mutt, I'd like to pipe them through "spamassassin
> --report". If I have 100 spams in the spam folder, and one spamassassin
> --report run takes ~5 sec, I'd have to sit and wait for almost ten minutes
> to flush the spam folder. And 100 spams is not much... 
> 
> Doing "| spamassassin --report &" instead of "| spamassassin --report"
> obviously is not a good solution.
> 
> The best I could think of this prototype script that puts the spams in a
> spool directory and then feeds them through spamassassin --report one by
> one:

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"


-- 
A man's best friend is his dogma.
=================================
Stephen