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

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



On Sat, Feb 21, 2004 at 11:13:45AM -0500, you [Stephen] wrote:
> > 
> > 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"


Ummh. Either me or you must be missing something.

By 

> >   I'd like to pipe them through "spamassassin --report"

above, I meant pretty much "|/usr/bin/spamassassin -r", and that I've tried
it. I also said

> > 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...

Which is why I don't use it. And I came up with this script

  http://iki.fi/v/tmp/spam-report                                               

and this alias
  macro index S ":set wait_key=no\n|~/script/spam-report\n:set wait_key=yes\nd" 
 

to overcome that.

Granted, stuffing the spam into a temporary folder and then --reporting it
with a separate macro key - like Daniel E. Eisenbud suggested later in this
thread - does almost the same. My script just starts processing immediately,
and you can't forget to flush the temporary folder.


-- v --

v@xxxxxx