<<< Date Index >>>     <<< Thread Index >>>

Re: Order of send-hook and folder-hook options.



On Wed, Oct 10, 2007 at 05:43:44PM -0500, Kyle Wheeler wrote:
> What about something like this:
> 
>      folder-hook .      my_hdr From: address_a
>      folder-hook =lists my_hdr From: address_b
>      send-hook '!~f address_b' 'my_hdr From: address_a'
>      send-hook '~C @example.com' 'my_hdr From: address_c'
> 

I couldn't get this one to work, but
        send-hook '~f address_a !~C @example.com' etc
seems to work.

>      folder-hook . 'set my_stophook=no; my_hdr From: address_a'
>      folder-hook =lists 'set my_stophook=yes; my_hdr From: address_b'
>      send-hook . \
>          '`[ $my_stophook == yes ] && echo set my_stophook || echo my_hdr 
> From: address_a`'
>      send-hook '~C @example.com' 'my_hdr From: address_c'

This one didn't appear to work either; with both, the send-hook still overrode
the folder-hook.

> Of course, you may want to do something a little simpler, and a little 
> more effective than using a folder-hook to set your return address. 
> Personally, I'd do something like this:
> 
>      send-hook .            my_hdr From: address_a
>      send-hook ~l           my_hdr From: address_b
>      send-hook @example.com my_hdr From: address_c

I think I saw this one before; it works, but it means I need to keep track of
the lists I'm subscribed to (rather than just filtering everything sent to my
list address into a separate folder).

On Wed, Oct 10, 2007 at 03:50:57PM -0700, Gary Johnson wrote:
> What I've done is nest them, so that a set of folder-hooks define 
> the set of send-hooks and/or message-hooks to be used within that 
> folder.  It looks a little complicated at first, but it works quite 
> well.

This occurred to me, but I couldn't get the quoting right.

Thanks, both of you.

-- 
Benjamin A'Lee <bma@xxxxxxxxxxxxxx>
http://subvert.org.uk/~bma/
"Now, now, dear man, this is not the time to be making enemies." - Voltaire,
on his deathbed when a priest asked him to "renounce Satan"

Attachment: pgpBm4zpMnHBJ.pgp
Description: PGP signature