On Fri, May 28, 2004 at 03:53:57PM EDT, Matt Price wrote: > more fundamentally: the "send-hook ." line trumps the folder-hooks, > doesn't it? At least so it seems to me. So my folder-hooks are > useless. Is there a way to modify things so this works approximately > like this: > > IF a send-hook paplies, use it, > ELSE IF folder-hook applies, use it, > ELSE use the default From: and signature settings Easy: folder-hook folder1 'send-hook sweetie "do sweetie stuff"; send-hook . "do folder1 stuff"' folder-hook folder2 'send-hook sweetie "do sweetie stuff"; send-hook . "do folder2 stuff"' folder-hook . 'send-hook sweetie "do sweetie stuff"; send-hook . "do default stuff"' This even allows you to fine tune which send-hooks you want to override by which folder-hooks (say, sending from a particular folder even to sweetie won't do sweetie stuff). The only problem you'll notice is that you must repeat all the send-hooks in each folder-hook. Naturally, this can be automated: source 'echo "\ folder-hook folder1 \'sweetiehook; send-hook . \"do folder1 stuff\"\'\ folder-hook folder2 \'sweetiehook; send-hook . \"do folder2 stuff\"\'\ folder-hook . \'sweetiehook; send-hook . \"do default stuff\"\'\ " | sed "s/sweetiehook/send-hook sweetie \"do sweetie stuff\""|' I may have screwed up some of the quoting, though, so beware :-( Enjoy, - Dave -- Uncle Cosmo, why do they call this a word processor? It's simple, Skyler. You've seen what food processors do to food, right? Please visit this link: http://rotter.net/israel
Attachment:
pgpdy2fa73SxD.pgp
Description: PGP signature