bisdiouf
Mon, 01 Mar 2010 08:05:50 -0800
Hello, Thank I've seen the syntaxe in the exim doc. It's work but the if we let it like this the others destinations won't get the message. I've add the condition "unseen" and now it meen that a copy is set to the filter address. if foranyaddress $h_to:,$h_cc: ($thisaddress matches ^t...@example.sn) then unseen deliver "n...@example.sn" endif Is it possible to block the message of t...@example.sn after the "unseen" condition. It's meen that not a copy will be delivred to t...@example.sn. Best Regards > On Thu, 2010-02-25 at 12:37 +0000, bisdi...@orange.sn wrote: >> Hello, >> Not that exactelly, >> >> I take my example: >> >> if $header_to: is "us...@domain.com" then deliver "n...@domain.com endif >> >> >> Now if I take a new email and I put in the destinary field (A) 2 >> addresses >> like us...@domain.com and us...@domain.com, the filter will not match. >> >> I know in this case the most likely condition to take is "contains" but >> like I said in my first email, this condition will filter all others >> adresses like "xxxus...@domain.com" and I don't want this. >> >> Is it clear now? > > So the message received has more than one address in To headers, like > this: > > From: "John Smith" <john.sm...@example.com> > To: "Peter Pan" <peter....@example.com>, "Capt. Hook" <h...@example.com> > > In which case, "is" doesn't match the header because the header is no > longer just that address, and "contains" isn't specific enough. Maybe a > foranyaddress would work here. > > if foranyaddress $h_to:,$h_cc: ($thisaddress matches ^t...@example.sn) > then > deliver "n...@example.sn" > endif > > Again, not tested, but that's almost straight out of the manual > > -- > The Exim manual - http://docs.exim.org > > > > -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/