Re: [exim] Aide

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ted Cooper
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Aide
On Thu, 2010-02-25 at 12:37 +0000, bisdiouf@??? wrote:
> Hello,
> Not that exactelly,
>
> I take my example:
>
> if $header_to: is "user1@???" then deliver "nama@??? endif
>
>
> Now if I take a new email and I put in the destinary field (A) 2 addresses
> like user1@??? and user2@???, 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 "xxxuser1@???" 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.smith@???>
To: "Peter Pan" <peter.pan@???>, "Capt. Hook" <hook@???>

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 ^toto@???)
then
deliver "nama@???"
endif

Again, not tested, but that's almost straight out of the manual

--
The Exim manual - http://docs.exim.org