On Wed, Feb 01, 2006 at 09:45:06AM -0600, Lance Simmons wrote: > > I forgot to add that I have tried doing just what you say, and it does > not work. Only the currently-highlighted message has the macro > performed on it. Which kind of makes sense, because the macro records > keystrokes. > > I'm looking for something that will allow me to tag multiple spams and > then report them all with one keystroke. What you describe isn't it, at > least not with the macro quoted above. Does anyone have a better > suggestion? > If you don't mind changing the macro.. this works for me: From my muttrc: # SpamAssassin integration # Delete is re-bound to move messages to Trash. # They will be filed as ham by cron script macro index d "s=Trash\n" "move message to trash" macro pager d "s=Trash\n" "move message to trash" # Spam that SA missed is manuall sent to spam folder macro index X "s=spam\n" "file as Spam" macro pager X "s=spam\n" "file as Spam" # Junk/spam mail older than two days is automatically marked for deletion # because it will have already been processed as spam by my cron script folder-hook "=spam" 'push "~d>2d"\n' Then run this script from your crontab: ----Start Script---- #!/bin/sh SPAMBOX=/home/$USERNAME/mail/spam TRASH=/home/$USERNAME/mail/Trash [ -w $TRASH ] || exit 1 [ -w $SPAMBOX ] || exit 1 # process Trash as ham if /usr/bin/sa-learn --mbox --ham $TRASH then # delete Trash /bin/cat /dev/null > $TRASH echo "ham processed" else echo "ham not processed"; fi # process spam, don't delete - I'll review it later by hand /usr/bin/sa-learn --mbox --spam $SPAMBOX echo "spam processed" exit 0 ----End Script---- This makes the macro very simple and it can be applied to multiple messages in the same way I described in my first reply. I tested it just now and it worked. -- Ken
Attachment:
signature.asc
Description: Digital signature