-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, February 28 at 11:41 AM, quoth Matthew R. Dempsky: > I'd like to setup mutt to set a ``Bcc: [EMAIL PROTECTED]'' > header field whenever I address email to [EMAIL PROTECTED]'' > (except when foo=utdlug). Right now I have the following line in my > .muttrc: > > send-hook '~t @utdallas\.edu$ !~t [EMAIL PROTECTED]' 'my_hdr "From: [EMAIL > PROTECTED]" ; my_hdr "Bcc: [EMAIL PROTECTED]"' > > The default From field is set as I'd like, but Bcc is not.
Which is to be expected. From the manual (http://www.mutt.org/doc/manual/manual-3.html): Note: the send-hook's are only executed ONCE after getting the initial list of recipients. Adding a recipient after replying or editing the message will NOT cause any send-hook to be executed. Also note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook. Particularly that last bit. > Is there another way to achieve the desired effect (i.e., routing an > extra copy of the email to my utdallas.edu mailbox so I can be > informed when their spam filtering software decides to trash my > messages)? Sure. One way (this may seem pretty idiotic) is to use 'push' in your hook, rather than trying to get the hook to do it itself. That allows mutt to get around to changing the recipients when it is convenient. Like this: send-hook '~t @utdallas\.edu$ !~t [EMAIL PROTECTED]' \ 'push <edit-bcc>[EMAIL PROTECTED]<enter>' Also, my_hdr is a rather silly way to set your from address. Is there a reason that you're not using $from? There may be a better way to achieve what you're after. ~Kyle - -- Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it. -- Linus Torvalds -----BEGIN PGP SIGNATURE----- Comment: Thank you for using encryption! iD8DBQFF5cXkBkIOoMqOI14RAqEfAJ9hxX9GgYBQy4EoinEF61J/R1jPZwCeOYRf yFNUm+wZFSCII9PlTaIhlNk= =v+nj -----END PGP SIGNATURE-----
