On Thu, Nov 08, 2012 at 09:47:26PM +0100, Eric Smith wrote: > Jeremy > > This is how I did it: > > set sendmail = "/home/eric/bin/get_subject_and_send.sh" > > $ cat /home/eric/bin/get_subject_and_send.sh > > #!/bin/bash cat /dev/stdin| tee >(SUBJECT=`formail -z -x Subject`;echo > "^Subject:.*$SUBJECT">>/home/eric/serialised_subjects;echo perl -ni -e > \"print if not /$SUBJECT/ \" /home/eric/serialised_subjects|at now > +50 days | /usr/lib/sendmail -t -oem -oi -f eric.sm...@trustfood.org
Might I recommend using $@ instead of hardcoding the values to sendmail there? Will make the script more of a generic "log the subject and pass to sendmail". I mean, if the script works, it works, but I don't like hardcoding things like that, and mutt will pass its own arguments to the sendmail program. > It passes my tests. Now I just need conditional define and undefine of the > sendmail var. There are plenty of hooks for this, depending on how you want to do it. Holler if you need help! -Jeremy
pgpduv07kCSxs.pgp
Description: PGP signature