On Sat, Mar 22, 2003 at 10:31:00AM +0200, [EMAIL PROTECTED] wrote: > I am trying to create a macro that does the following when I press F2: > > Copy the message highlighted in the index to a mailbox named 'spam'. > Delete the message.
Sorry, I don't have time to debug your macro. But an example of one I've got for SpamCop that works as follows: 1. Strike the F12 key whenever you are on a piece of spam. This appends it to a file (in my case $HOME/.spam/foo) 2. When you've accumulated enough spam to make it worthwhile to send, run the 'spamsend' script, which breaks the accumulated spam into separate attachments so SpamCop can process them. (I got tired of sending dozens of separate E-mails for each piece of spam.) The macro: macro index <f12> s/home/YOURLOGIN/.spam/foo^M "Save spam for later processing" The associated script follows my signature. Note that you'll have to put a recipient address in your mutt aliases file. Cheers, -- Dave Ihnat [EMAIL PROTECTED] ========================================================================== # # spamsend - Process and send spam to SpamCop in one mailing using Mutt # # Author: David M. Ihnat # # Copyright abandoned 2003. This is a work in the Public Domain. # # NOTE: You must have an alias 'spamcop' in your Mutt aliases file. ################################################################ # DATA ################################################################ SPAMDIR="$HOME/.spam" FLIST=""; RECIPIENT=spamcop ################################################################ # MAIN ################################################################ # Split any multiple stores cd $SPAMDIR; # We don't care what the filenames are, but DO care if there are more # than one spam per file. If so, strip them into multiple files. DUPFILES=`grep -H "^From:" * | cut -f1 -d: | sort -n | uniq -D | uniq` if [ "$DUPFILES" ] then export SPFILE; for SPFILE in $DUPFILES do formail -s sh -c 'cat > ${SPFILE}_${FILENO}' < $SPFILE; rm $SPFILE; done; fi; # Build the list of spamfiles to attach. for SPFILE in * do FLIST="$FLIST -a $SPFILE"; done; # All that work, just to do this... mutt -s spam $FLIST spamcop # Get rid of the spam files--or not, your choice. # Don't forget to periodically clean out the 'sent' file to SpamCop, too. echo -n "Zap $SPAMDIR?: "; read ANS; if [ "$ANS" = "y" ] then rm -fr $SPAMDIR/*; fi; exit 0; ################################################################ # END ################################################################ -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list