Re: Problem with Fcc: saved mailbox
Hi Jeffery, * Jeffery Small j...@cjsa.com [27. Dec. 2010]: I have looked over the manual and I am still confused as to how to use send2-hook in this case. When I edit my message and change the From: line while leaving the To: line alone, I do not understand why mutt is then failing to set the appropriate Fcc: box based upon the fcc-save-hook entries in my hook file. Why does mutt care if the From: line is altered since the fcc-save-hook should be matching on the To: line? In my hook file I have hundreds of fcc-save-hook patterns for different email addresses and I don't actually see how I would use send2-hook to address this problem because it seems like I would need a send2-hook entry for every pattern, and I don't know what command I would execute anyway in order to get the hook file reread. My mistake. The hooks don't get re-evaluated while editing the email. However, after looking through an updated version of the manual, I did notice the alternates command and gave that a try. I set it to a list of all the addresses I am using and then tested out mutt doing the procedure I described above, and that seems to take care of the problem! I'm still not clear why changing the From: line confuses mutt, but I guess, after editing the message, mutt no longer remembers who I am, so it no longer knew where to look for the appropriate config and hook files until I informed it of my identity with the alternates command. Please feel free to clarify my understanding of this if I am wrong. Sorry I have no clue, I tested with a simple setup but do not encounter your problem. Difficult to know without knowing your setup. But perhaps this helps: 3.48. default_hook Type: string Default: “˜f %s !˜P | (˜P ˜C %s)” This variable controls how “message-hook”, “reply-hook”, “send-hook”, “send2-hook”, “save-hook”, and “fcc-hook” will be interpreted if they are specified with only a simple regexp, instead of a matching pattern. The hooks are expanded when they are declared, so a hook will be interpreted according to the value of this variable at the time the hook is declared. The default value matches if the message is either from a user matching the regular expression given, or if it is from you (if the from address matches “alternates”) and is to or cc'ed to a user matching the given regular expression. Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-
Re: Problem with Fcc: saved mailbox
I wrote: However, in some circumstances while editing the original message, I alter the From: line to an alternative address I use with a different domain name. In this situation, when I exit the text editor, mutt apparently does not scan the hook file and simply sets Fcc: to the default value. Richard richard.zidli...@googlemail.com and Gregor Zattler telegr...@gmx.net suggested: send2-hook is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. send2-hook is executed after send-hook, and can, e.g., be used to set parameters such as the $sendmail variable depending on the message's sender address. use send2-hook. Thank you both very much for the suggestion. I had recently upgraded from mutt version 1.4 and was not even aware of this variable. I have looked over the manual and I am still confused as to how to use send2-hook in this case. When I edit my message and change the From: line while leaving the To: line alone, I do not understand why mutt is then failing to set the appropriate Fcc: box based upon the fcc-save-hook entries in my hook file. Why does mutt care if the From: line is altered since the fcc-save-hook should be matching on the To: line? In my hook file I have hundreds of fcc-save-hook patterns for different email addresses and I don't actually see how I would use send2-hook to address this problem because it seems like I would need a send2-hook entry for every pattern, and I don't know what command I would execute anyway in order to get the hook file reread. However, after looking through an updated version of the manual, I did notice the alternates command and gave that a try. I set it to a list of all the addresses I am using and then tested out mutt doing the procedure I described above, and that seems to take care of the problem! I'm still not clear why changing the From: line confuses mutt, but I guess, after editing the message, mutt no longer remembers who I am, so it no longer knew where to look for the appropriate config and hook files until I informed it of my identity with the alternates command. Please feel free to clarify my understanding of this if I am wrong. Thanks again. -- Jeffery Small
Re: Problem with Fcc: saved mailbox
* Jeffery Small j...@cjsa.com [12-27-10 04:11]: However, after looking through an updated version of the manual, I did notice the alternates command and gave that a try. good I set it to a list of all the addresses I am using and then tested out mutt doing the procedure I described above, and that seems to take care of the problem! I'm still not clear why changing the From: line confuses mutt, but I guess, after editing the message, mutt no longer remembers who I am, so it no longer knew where to look for the appropriate config and hook files until I informed it of my identity with the alternates command. iiuc, send-hook is evaluated upon *initiating* the outgoing mail and send2-hook on changing/editing the header value. hth -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org
Re: Problem with Fcc: saved mailbox
Hi Jeffery, mutt users, * Jeffery Small j...@cjsa.com [26. Dec. 2010]: When composing a normal message in mutt (1.5.21), after exiting the text editor and returning to the header/attachment page prior to sending, the Fcc: box is properly set based upon value in the hook file for the recipient. However, in some circumstances while editing the original message, I alter the From: line to an alternative address I use with a different domain name. In this situation, when I exit the text editor, mutt apparently does not scan the hook file and simply sets Fcc: to the default value. From the manual: 19. Change Settings Based Upon Message Recipients [...] reply-hook [!]pattern command send-hook [!]pattern command send2-hook [!]pattern command [...] send2-hook is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. send2-hook is executed after send-hook, and can, e.g., be used to set parameters such as the $sendmail variable depending on the message's sender address. -- use send2-hook. Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-
Problem with Fcc: saved mailbox
When composing a normal message in mutt (1.5.21), after exiting the text editor and returning to the header/attachment page prior to sending, the Fcc: box is properly set based upon value in the hook file for the recipient. However, in some circumstances while editing the original message, I alter the From: line to an alternative address I use with a different domain name. In this situation, when I exit the text editor, mutt apparently does not scan the hook file and simply sets Fcc: to the default value. What can I do in the configuration file to force mutt to set the proper Fcc: regardless of which From: address I am using? Thanks for any insights. -- Jeffery Small