Re: 3 Mutt binds for SpamAssassin, if anyone is looking ;)
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:
http://iki.fi/v/tmp/spam-report
(Sorry, it's ugly).
In mutt I use
macro pager S ":set wait_key=no\n|~/script/spam-report\n:set wait_key=yes\nd"
macro index S ":set wait_key=no\n|~/script/spam-report\n:set wait_key=yes\nd"
macro index ¤ ":set wait_key=no\n|~/script/spam-revoke\n:set wait_key=yes\n"
macro pager ¤ ":set wait_key=no\n|~/script/spam-revoke\n:set wait_key=yes\n"
macro index H s+to-sa-ham\n
macro pager H s+to-sa-ham\n
I open for more elegant solutions...
-- v --
v@xxxxxx