I have folder hooks as well as reply-hooks, as follows:
folder-hook +in/(class*|school) "source ~/.mutt/school.hooks"
set from= XXXX@XXXXX.COM
my_hdr Organization: myschool
my_hdr X-Operating-System: `uname -sr`
my_hdr X-PGP-KeyID: 3E3C8999
folder-hook +in/class_999 my_hdr To: my999prof
folder-hook +in/class_999 my_hdr X-Class: ns999
folder-hook +in/class_888 my_hdr To: my888prof
folder-hook +in/class_888 my_hdr X-Class: ns888
reply-hook . 'unmy_hdr To'
The objective here is to ensure that new compositions go to the
professor associated with that mailbox, and that part works. However,
when I reply to another student whose message is in the same folder, I
want my reply to go to that student only. The reply-hook should undo
the my_hdr command, but it fails. Instead, my replies are addressed
to both the original sender, and the professor.