On  0, Denis Voitenko <[EMAIL PROTECTED]> wrote:
> Hey, thanks. You helped a lot. Just a minor question I was gonna ask you.
> 
> Here's the deal. There is a user 'postman' on the box that fetches mail from
> *@domain.com and sorts it by headers (with maildrop) and puts it in
> approbriate boxes like so
> 
> .mailfilter
> 
> if(^/(To|Cc): .*bob){
>     to "!bob"
> }
> 
> if(^/(To|Cc): .*jack){
>     to "!jack"
> }
> 
> but what heppens is when a message has both bob and jack in the to: field or
> say bob in to: and jack in cc: the message gets delivered to bob simply
> because bob is the first in the filter. Those messages never get delivered
> to jack. How'd I fix that?
> 
> 
Glad the previous examples worked. If bob and jack are in the To: and/or Cc:
fields, then you could use the following logic:
 
if(^/(To|Cc): .*(jack||bob).*/ ){
    to "!jack bob"
}

The above will foward any mail received by either jack OR bob to both jack AND bob.
I am assuming that's is the goal you are trying to acheive i.e. to send the mail to
both of them, even if it is addressed to only one of them. (I don't know why you
would want to do that. ;-) ).

The operator used for To and Cc, is a bitwise operator, where as for bob and jack, we
are using logical operators.

Subba Rao
[EMAIL PROTECTED]
http://pws.prserv.net/truemax/

Reply via email to