Hello Michael > I do not understand why you are running the send-hook inside of the > folder-hook. Do you have some other hooks that are removing the effect > of the send-hook elsewhere? I'm not entirely sure why I adopted this way if i'm honest. Over the last year or so i've changed the way I use hooks for various reasons and and so just made little changes to ones I had already to suit what I was trying to achieve. I also adapted some of the methods used in muttrc examples I found on the internet and mutt.org. Probably not the best approach I know.
> It would be much simpler to do this: > > send-hook . unmy_hdr reply-to from > send-hook '~t "(manchester|cs.man)\.ac\.uk"' my_hdr From: Jamie Griffin > <griff...@cs.man.ac.uk> > send-hook '~t "(manchester|cs.man)\.ac\.uk"' my_hdr Reply-To: > ja...@fantomatic.co.uk Thanks for your example here, that does make it clearer. > The fundamental problem with your original approach is the fact that > hooks remove one level of quoting. Yes that makes sense now, I think I can see where I went wrong. I need to re-read the manual I think to grasp the quoting technique better. Ive made some changes based on your example and explanation which seem to be working as I want, like so: send-hook . 'my_hdr From: Jamie Griffin <ja...@fantomatic.co.uk> ; \ my_hdr Reply-To: ja...@fantomatic.co.uk' send-hook '~t mutt-users' 'my_hdr From: Jamie Griffin <ja...@fantomatic.co.uk> ; \ my_hdr Reply-To: mutt-users@mutt.org' send-hook '~t "(manchester|cs.man)\.ac\.uk"' 'my_hdr From: Jamie Griffin <griff...@cs.man.ac.uk> ; \ my_hdr Reply-To: ja...@fantomatic.co.uk' Does that look right, or could it be improved further. Hopefully uou can see what i'm trying to achieve(?) which is I want my default From: and Reply-To: headers to be as they are in the first pattern; with those same two headers altered depending on which mailing list address or other address i'm sending to. I have not set $from in my muttrc and just let the hooks set that part dynamically. What would be even more desirable is if I can set the hook to match a pattern based on my cs.man.ac.uk address used in the To: header of the email received, so for example any email sent To: myusern...@cs.man.ac.uk I get in my inbox, when I reply to it the From: and Reply-To: headers are set as they are in the third hook above. I have not been able to get that work at all. Thank you for you help Michael. Jamie.