* Suvayu Ali <fatkasuvayu+li...@gmail.com> [01-01-70 12:34]: > > [...] > > > Note that I do not have any default send-hook set. I also have the > > > following reply-hooks so that I can automatically reply with the correct > > > from address based on which account the email was delivered to. > > > > > > reply-hook . my_hdr From: perso...@gmail.com > > > reply-hook '~h "Delivered-To: +list@gmail\.com"' my_hdr From: > > > "l...@gmail.com" > > > reply-hook '~h "Delivered-To: +me@work1\.com"' my_hdr From: > > > m...@work1.com > > > reply-hook '~h "Delivered-To: +me@work2\.com"' my_hdr From: > > > m...@work2.com > > > > > > Now my problem is the default reply-hook above overrides the from > > > address set by reverse_name=yes. If I comment it out, then the from > > > address is what was set by the last "my_hdr From: ..." command in the > > > above hooks. I want it to be my personal address. > > > > > > Any ideas how to resolve this conflict between hooks and reverse_name? [...] > I have gone through all the sections you mention. If I use the > send-hook to set the default, then all the matching I do with the > reply-hooks above get overwriten. I can't do the same matching in a > send-hook since it does not support a '~h <hdr_pattern>' matches. I > think that is reasonable, since send-hook matches the outgoing message. > My understanding of email headers is very limited. Do you know of > anyway I can match this in a send-hook? Or maybe I should try a > send2-hook? As far as I understood the manual, the order of hook > evaluation is: reply-hook, send-hook, send2-hook.
Perhaps I am not seeing the forest for the trees.... Having "reverse_name=yes", responding to mail addressed to "l...@gmail.com" should have "l...@gmail.com" as the sender which obviates the reply-hook: reply-hook '~h "Delivered-To: +list@gmail\.com"' my_hdr From: "l...@gmail.com" Try the following: set reverse_name add as the very first send-hook: send-hook . "" comment out or remove subject reply-hooks Make sure that all of the required "reverse_name"s are defined in "alternates" alternates [-group name] regexp [ regexp [ ... ]] unalternates [ * | regexp [ regexp [ ... ]] ] alternates is used to inform mutt about alternate addresses where you receive mail; you can use regular expressions to specify alternate addresses. This affects mutt's idea about messages from you, and messages addressed to you. unalternates removes a regular expression from the list of known alternates. The -group flag causes all of the subse- quent regular expressions to be added to the named group. I can, I think, understand the function of reply-hook and send2-hook but have never actually found a need for either. I use "set reverse_name" rather than "reverse_name=yes" but cannot tell you whether one is preferred over the other. Be sure to preserve your ~/.muttrc so you can return to it if alterations introduce errors. I suggest copying to a <new-name> and using it as: mutt -F <new-name> I may be completely off-base, but this is to the best of *my* understanding. gud luk, -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535 @ http://linuxcounter.net