On Wed, Mar 20, 2002 at 03:04:20PM -0700, Steve Talley wrote: > I do use procmail. As an MDA. procmail isn't appropriate here. > > If mutt has the ability to allow the user to edit a message, and then > automatically save it to the mail folder, and delete the orignal, why > shouldn't it be able to do the same with an arbitrary shell script?
How about making a macro which sets your editor to the script, runs <edit>, and then resets your editor? For example, try typing :set editor = 'sleep 1; perl -pi -e "s/subject/sUbJeCt/i"' and then pressing e on some message. It'll change the case of the subject header. The sleep 1 is necessary because mutt uses the file's timestamp to determine if the message has been modified, and since the script runs so fast, mutt assumes nothing was changed. Someone posted a patch a few months ago which has mutt change the file's timestamp to "one second ago" before calling the editor, so that you wouldn't need that pause. -- Mike Schiraldi VeriSign Applied Research
msg25825/pgp00000.pgp
Description: PGP signature