On 13Sep22 09:49-0700, Will Yardley wrote: > I agree that would be useful. That said, I usually handle the scenario > you describe this way: > send-hook '~C ^mutt-users@mutt\.org$' 'my_hdr From: Will Yardley > <mutt-us...@veggiechinese.net>'
I had a look into the code and also experimented a bit how mutt_find_user_in_envelope [1] works. But as far as I see, there is no easy way to make it also look into further headers, because the ENVELOPE struct [2] does not provide those. 1: https://gitlab.com/muttmua/mutt/-/blob/master/alias.c#L692 2: https://gitlab.com/muttmua/mutt/-/blob/master/mutt.h#L739 Anyways, your reply gave me the idea, if the `reply-hook` might work. But I also did not succeed here. I think it is not possible with mutt hooks to work with the matched groups like below, is it? --- paste: reply-hook ~h'^Envelope-to:\ (.\*)$' set from=\1 --- eop This does not work because if the expression is matched, the from is set to "1", group referencing is not applied or I do it wrongly. Also the alternates matching is run afterwards, which is good. So when the alternates match, they'll overwrite what the reply-hook set before. Any idea how to use the reply-hook properly? Cheers, -- Bastian