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/ |

Reply via email to