Robert Chien <[EMAIL PROTECTED]> wrote:
>
> basically, i want to set signature to .signature.work when sending email
> to people at work, and set signature to just .signature for the rest.
I do that, too. Here's my setup:
I want to use "localsig" if the message is one in which ALL of the
recipients are local users, or "remotesig" if the message has any
recipients which are external to my company.
My logic might seem weird, but it's because of the "any recipients"
part. The send-hook is evaluated for each address in the message to see
if it's true. So, I set the signature to the "local" signature, then
the next send-hook looks for recipients that are not in my local
organization. Since that's the majority of where my mail gets sent, the
"remotesig" is usually chosen.
send-hook ~A "set signature=~/.localsig"
send-hook '! ~C "@.*(convex|(convex|rsn)\.hp)\.com$"' \
"set signature=~/.remotesig"
The expression matches [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], etc.
Now that I look at it, though, it needs an update on domain names, but
basically it works. :)
I'm wondering if my backslashes are in the right places, though, or if I
have the right number of them. Since there are two levels of quotes
used, maybe I should use "\\." for a dot, or "\\\." to get the proper
effect. Any quote/regexp experts know for sure? :)
--
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
Convex Division | PGP: 5B 47 34 9F 3B 9A B0 0D AB A6 15 F1 BB BE 8C 44