procmail
[Top] [All Lists]

Re: Setting variables properly

1996-04-30 18:52:31
On Sun, 28 Apr 1996, Philip Guenther wrote:

PGHOST=(@|%)(((.*)?\.)?Destek\.net|torah\.org)

:0
* ^TOgabbai$PGHOST


How do I set the variable properly and use it as a condition properly,
given the fact that I need gabbai to be set individually and NOT as part
of the variable. Thanks,

You set it just fine.  However, procmail doesn't expand variables in
conditions unless explicitly told to, but preceding the condition with
a dollar sign, i.e.:

:0
* $ ^TOgabbai$PGHOST


As for PGHOST, I would be tempted to change it to read:

PGHOST = (@|%)(([-a-z0-9]\.)*Desktek\.net|torah\.org)

For some reason, I tried inserting the above (not as a variable, but
straight as a condition, instead of what I had earlier, and it didn't
work. But as mentioned below, I don't need really really good matching as
the other conditions will probably catch it.

That is, only domain name parts to follow the '@' or '%' and precede
Desktek.net.  As you have it now, the following header would match:

      To: gabbai(_at_)somewhere(_dot_)else, bob(_at_)desktek(_dot_)net

An additional condition that I didn't bother to post is that it must be
coming from  majordomo(_at_)torah(_dot_)org (or the whole condition above to
determine host name). Since majordomo doesn't send to two addresses in one
message, I'm fine.

Thanks for your help,

 -------------------------------------------------------------------------
 | Brock Rozen | brozen(_at_)netvoyage(_dot_)net | 
http://www.netvoyage.net/~brozen |
 | Check out my Auto-Reply System -- Send me mail with subject SEND HELP |
 -------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Setting variables properly, Brock Rozen <=