procmail
[Top] [All Lists]

Re: ANDing

1999-04-27 16:16:33
Dale Neumann asked,

| Is it acceptable to use the ^TO macro in two separate condition lines in a
| given recipe?  E.g...
| 
|     :0
|     * ^TOregexp
|     * ^TOregexp
|     some-action
| 
| I want to perform an action only upon the existence of two specific
| addresses in the (To|Cc|Bcc) fields.  But those addresses could be in a
| different order every time; I'm not yet crafty enough with regular
| expresstions to be able to do this on a single condition line.

That's exactly the right way to do it, Dale.  Because it is acceptable
for them to appear in either order, you have to use two conditions.  (Well,
it could be done in one, but it would be an awful mess to type and read,
so two are better.)

<Prev in Thread] Current Thread [Next in Thread>