<<< Date Index >>>     <<< Thread Index >>>

Re: send-hook question (or Delivered-To: hook?)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, May 24 at 11:10 PM, quoth phyrster:
> I noticed that in message header there is actually one line:
>
> |Delivered-To: phyrster@xxxxxxxxx
>
> My question is: apart from using send-hook and folder-hook, it is possible 
> that mutt 'hook' this header and perform some action? 

Yes.

message-hook '~h "^Delivered-To: phyrster@xxxxxxxxx"' 'do something'

That will trigger whenever you view the message.

> What I have in mind is that if the header contains 
>
> |Delivered-To: phyrster@xxxxxxxxx
>
> then mutt should always use this address when I reply to the message. In that 
> case, I will always have unified reply address and don't have to 
> worry about which mail address I am using.

What you're looking for is this:

    reply-hook '~h "^Delivered-To: phyrster@xxxxxxxxx"' my_hdr From: 
physter@xxxxxxxxx

But you should probably investigate the "alternates" command and the 
$reverse_name setting. That would be more direct.

~Kyle
- -- 
The more men you make free, the more freedom is strengthened and the 
... greater is the security of the State.
                                    -- Frederick Douglas, Nov 17, 1864
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFEdImvBkIOoMqOI14RArEJAKDPJ3k9Z2OggbayXJksR1uK/TpYiQCgksul
bg76v4vsLaBs+zM7DQK+UlQ=
=AjVY
-----END PGP SIGNATURE-----