Re: Send-hook set my_hdr Not Working as Expected
Koralatov wrote, on Wed, May 09, 2012 at 10:49:18PM +0100: [snip] I thought I'd fixed it by using the following: send-hook * unmy_hdr From: send-hook * my_hdr From: Michael Graham michael@... send-hook @mutt.org unmy_hdr From: send-hook @mutt.org my_hdr From: Koralatov use...@koralatov.com The star is (afaik) not a valid regular expression in mutt. Use a period instead for match anything: send-hook . unmy_hdr From: Also, on the subject of send-hooks, send2-hooks and reply-hooks, read up on http://durak.org/sean/pubs/software/mutt/configuration.html#send-hook -- Jostein
Re: Send-hook set my_hdr Not Working as Expected
On Wed, May 09, 2012 at 10:47:58PM +0100, Koralatov wrote: send-hook * unmy_hdr From: send-hook * my_hdr From: Michael Graham michael@... send-hook @mutt.org unmy_hdr From: send-hook @mutt.org my_hdr From: Koralatov use...@koralatov.com I use this pattern: send-hook . my_hdr From: default send-hook ~t @mutt.orgmy_hdr From: mutt send-hook ~t @example.com my_hdr From: etc It works for me. -- Ed Blackman signature.txt Description: Digital signature
Re: Send-hook set my_hdr Not Working as Expected
On Thu, May 10, 2012 at 09:28:03PM +0100, Koralatov wrote: On Thu, May 10, 2012 at 19:09, Ed Blackman wrote: I use this pattern: send-hook . my_hdr From: default send-hook ~t @mutt.orgmy_hdr From: mutt send-hook ~t @example.com my_hdr From: etc I'm testing it now, but so far, it seems to work. Should I use the same pattern (~t b...@blah.com) for set signature as well? Assuming you want the signature to change in sync with the From: line, yes. You can use any patterns that fit your needs, not just ~t. -- Ed Blackman signature.txt Description: Digital signature
Re: send-hook and my_hdr
On Fri, Oct 26, 2001 at 01:52:16AM +0200, Lars Becker wrote: On Thu, Oct 11, 2001 at 02:53:29PM +0200, Thomas Roessler wrote: See that header in this mail. That is from a send-hook. Problem is that once that hook is activated, the header ends up in all mails (like this one). How to fix? Add a hook matching all messages which unmy_hdrs the entry in question. That won't work in all cases. If i set unmy_hdr in a sent-hook, all from-headers set by a folder-hook are removed too, and not only the hooks which were set by send-hooks. Is there any way to use folder-hooks *and* send-hooks together to modify the From-headers in a way that i want? I don't have your original message handy to see just how you wanted your headers, but here is an example that should give you the general idea. (This particular example is untested, but I have verified that similar examples do work.) folder-hook . unhook send-hook folder-hook . 'unmy_hdr From:' folder-hook folder1 send-hook . 'my_hdr From: default_for_folder1' folder-hook folder2 send-hook . 'my_hdr From: default_for_folder2' folder-hook . 'send-hook ~t person1 my_hdr From: for_person1' In this example, send-hooks and my_hdr From: settings are first cleared when any folder is entered. Then any folder-specific my_hdr From: settings are made as default send-hooks. Finally, any special send-hooks are set, either for all folders as shown, or as a function of the folder. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |
Re: send-hook and my_hdr
On 2001-10-26 01:52:16 +0200, Lars Becker wrote: That won't work in all cases. If i set unmy_hdr in a sent-hook, all from-headers set by a folder-hook are removed too, and not only the hooks which were set by send-hooks. Is there any way to use folder-hooks *and* send-hooks together to modify the From-headers in a way that i want? I'd set the $from variable from folder-hooks and use my_hdr from send-hooks to override it from case to case. -- Thomas Roesslerhttp://log.does-not-exist.org/
Re: send-hook and my_hdr
On Fri, Oct 26, 2001 at 10:28:20AM +0200, Thomas Roessler wrote: That won't work in all cases. If i set unmy_hdr in a sent-hook, all from-headers set by a folder-hook are removed too, and not only the hooks which were set by send-hooks. I'd set the $from variable from folder-hooks and use my_hdr from send-hooks to override it from case to case. Thanks Thomas. This works great! Greetings - Lars.
Re: send-hook and my_hdr
On Thu, Oct 25, 2001 at 11:44:12PM -0700, Gary Johnson wrote: folder-hook . unhook send-hook folder-hook . 'unmy_hdr From:' folder-hook folder1 send-hook . 'my_hdr From: default_for_folder1' folder-hook folder2 send-hook . 'my_hdr From: default_for_folder2' folder-hook . 'send-hook ~t person1 my_hdr From: for_person1' In this example, send-hooks and my_hdr From: settings are first cleared when any folder is entered. Then any folder-specific my_hdr From: settings are made as default send-hooks. Finally, any special send-hooks are set, either for all folders as shown, or as a function of the folder. Thanks. It's an interesting solution. However i have sticked to Thomas suggestion since i'm also using set reverse_name which also works if i set the from-header with set [EMAIL PROTECTED]. Of course i haven't told you therefore you couldn't know it. Greetings - Lars.
Re: send-hook and my_hdr
On Thu, Oct 11, 2001 at 02:53:29PM +0200, Thomas Roessler wrote: See that header in this mail. That is from a send-hook. Problem is that once that hook is activated, the header ends up in all mails (like this one). How to fix? Add a hook matching all messages which unmy_hdrs the entry in question. That won't work in all cases. If i set unmy_hdr in a sent-hook, all from-headers set by a folder-hook are removed too, and not only the hooks which were set by send-hooks. Is there any way to use folder-hooks *and* send-hooks together to modify the From-headers in a way that i want? Some days ago i've described this problem in greater detail in d.c.s.mailreader.misc [EMAIL PROTECTED] but got no solution for it. If somebody has a workaround i would greatly appreciate to hear it. Greetings - Lars.
Re: send-hook and my_hdr
On Fri, Oct 26, 2001 at 01:52:16AM +0200, Lars Becker (dis)graced my inbox with: On Thu, Oct 11, 2001 at 02:53:29PM +0200, Thomas Roessler wrote: See that header in this mail. That is from a send-hook. Problem is that once that hook is activated, the header ends up in all mails (like this one). How to fix? Add a hook matching all messages which unmy_hdrs the entry in question. That won't work in all cases. If i set unmy_hdr in a sent-hook, all from-headers set by a folder-hook are removed too, and not only the hooks which were set by send-hooks. Is there any way to use folder-hooks *and* send-hooks together to modify the From-headers in a way that i want? I'm not sure if this will work, but how about setting up a second send-hook that recreates the headers you lost from your folder hook? (of course, this is done after the first send hook nukes your headers...) -- Rob 'Feztaa' Park [EMAIL PROTECTED] -- I always arrive late at the office, but I make up for it by leaving early. -- Charles Lamb
Re: send-hook and my_hdr cc
On Tue, Feb 01, 2000 at 12:02:30PM -0500, David Shaw wrote: There is a certain domain that whenever I send mail to it, I need to automatically CC someone. I'd like to set up a send-hook for this, like this one: send-hook mydomain.com 'my_hdr Cc: user1,user2' That doesn't seem to work. I suspect the problem is that by the time the send-hook is executed, the Cc header is already written. Does anyone have a workaround for this? I suspect you are using autoedit and edit_headers ? The only way to get around this in that case is to unset autoedit so you can enter the to: field before the send-hook is execute. me -- pgp key available from http://www.cs.hmc.edu/~me/elkins-pgp-key.asc PGP signature
Re: send-hook and my_hdr cc
On Tue, Feb 01, 2000 at 10:22:16AM -0800, Michael Elkins wrote: On Tue, Feb 01, 2000 at 12:02:30PM -0500, David Shaw wrote: There is a certain domain that whenever I send mail to it, I need to automatically CC someone. I'd like to set up a send-hook for this, like this one: send-hook mydomain.com 'my_hdr Cc: user1,user2' That doesn't seem to work. I suspect the problem is that by the time the send-hook is executed, the Cc header is already written. Does anyone have a workaround for this? I suspect you are using autoedit and edit_headers ? The only way to get around this in that case is to unset autoedit so you can enter the to: field before the send-hook is execute. No, neither autoedit nor edit_headers is set. (I am using 1.1i by the way) David -- David Shaw | [EMAIL PROTECTED] | WWW http://www.jabberwocky.com/ +---+ "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." - Jeremy S. Anderson