I want to set my From: in mutt depending on a) the recipient address, & b) the folder I'm in. I've had the first task working for a long time with send-hooks that set my_hdr From: ... but I had no success in combining those send-hooks with folder-hooks.
finally I found something somewhere on the web that didn't work out of the box but showed me the direction. here's what I'm doing now (abbreviated & with some extra space for legibility):
folder-hook . "unhook send-hook" folder-hook . "send-hook . 'my_hdr From: gregor herrmann <gregor.herrmann@comodo.priv.at>'" folder-hook debian "send-hook . 'my_hdr From: gregor herrmann <gregor+debian@comodo.priv.at>'" folder-hook . "send-hook '~t ^.+@.*debian\.org' 'my_hdr From: gregor herrmann <gregor+debian@comodo.priv.at>'"
short explanation:
& it seems to work & I'm quite happy ;-)
gregoa, 2006-09-01 ff.