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

Re: binding more than one action to a key?



* Fernan Aguero <fernan@xxxxxxxxxxxxxxxx> [12-04-04 10:04]:
> here's my situation: I filter spam with spamassassin and would like to
> do some actions on messages that escape this filter and end up on my
> inbox. Preferably I would like to use just one key binding (they are
> called macros, aren't they?) to do all of the following:
> 
> i) report message to Vipul's Razor ("| spamassassin -r")
> ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
> iii) save message to =spam
> 
> I can write a small perl script to do this and assign a keybinding in
> mutt to pass the message to this program. However, perhaps there is a
> way to do this without using an external script?

A suggestion, rather than waiting for the above actions to be
completed, why don't you just send the *uncaught* spam to a
tem.mail.folder and write a cron script to perform the tasks while you
sleep?

ie:

/usr/bin/sa-learn --spam --mbox --sync /home/pat/mail/Spam
/usr/bin/razor-admin -discover
/usr/bin/razor-report /home/pat/mail/Spam
/bin/cat /home/pat/mail/Spam >> /home/pat/mail/Spam.old
/bin/rm /home/pat/mail/Spam
/usr/bin/touch /home/pat/mail/Spam

note: the touch action is to dispatch with the requirement to answer
the question to create a new mail box when the first spam is moved.

-- 
Patrick Shanahan                        Registered Linux User #207535
http://wahoo.no-ip.org                        @ http://counter.li.org
HOG # US1244711           Photo Album:  http://wahoo.no-ip.org/photos