Rob Reid <[EMAIL PROTECTED]> wrote:
>
> I thought that was what . is for, matching any folder, as in:
>
> folder-hook . unset save_empty
Maybe I should explain it a little clearer:
Suppose you have a set of hooks like this:
folder-hook . 'set variable=AAA'
folder-hook +folder 'set variable=BBB'
send-hook '~C user@domain' 'set variable=CCC'
Now, given this, I believe the original poster in this thread expects
that $variable would be set to "AAA" when he is sending to some other
user, and not in +folder, and expects it to be set to "BBB" if he sends
to another user while in +folder, and expects it to be set to "CCC" when
he sends to <user@domain>, regardless of the folder.
In fact, though, only the last statement is true. The others are true
SOMETIMES. Depending on what has happened before.
Folder-hooks only trigger when the folder is entered. If the user
enteres folder "+folder", $variable gets set to "BBB" at that time. As
long as the user sends mail to anybody but <user@domain>, $variable will
stay set to "BBB". But when he sends mail to <user@domain>, at that
time, $variable gets set to "CCC", and it stays that way. So from then
on, if he sends mail to any other user, $variable remains set to "CCC"
because there is nothing to reset it to anything else. Only when the
user changes folders again, will $variable change back to either "AAA"
or "BBB".
Now, if we were to add a new send-hook before the other:
send-hook ~A 'set variable=DDD'
This wouldn't have the desired effect either, because the variable would
no longer depend on the folder that was entered. When sending to
<user@domain>, $variable has the value "CCC". When sending to anyone
else, it has the value "DDD". Regardless of folder.
So you see, mixing folder-hooks and send-hooks that set the same
variable, is not a good idea.
--
David DeSimone | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED] | that there is no man really clever who has not
Hewlett-Packard | found that he is stupid." -- Gilbert K. Chesterson
Richardson IT | PGP: 5B 47 34 9F 3B 9A B0 0D AB A6 15 F1 BB BE 8C 44