Re: [Exim] multiple conditions

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Alan J. Flavell
Dátum:  
Címzett: Exim users list
Tárgy: Re: [Exim] multiple conditions
On Tue, 6 Apr 2004, Martin A. Brooks wrote:

> Is it possible to set multiple conditions in one ACL?


There's more than one way to do it.

> The exim spec seems a little vague on the topic.


Maybe it's the way you read it ;-) See 11.7
http://www.exim.org/exim-html-4.30/doc/html/spec_11.html#IX906

> condition = ${if < {$message_size}{2097152}{1}{0}} ${if> {$spam_score_int}{150}{1}{0}}


I don't know about the relative efficiency, but if I want to enforce
the AND of two separate conditions, I sometimes find it clearer to
write them as two separate "condition" clauses, like (untested)

condition = ${if < {$message_size}{2097152}{1}{0}}
condition = ${if > {$spam_score_int}{150}{1}{0}}

But you can do "and" / "or" just like it's shown in the documentation.

Btw, I'd recommend splitting your long lines at convenient point(s)
with a backslash, which incidentally makes them nicer when you're
posting them to a forum like this: (untested)

  condition =  ${if or {{eq{$local_part}{spqr}} \
                  {eq{$domain}{testing.com}} {0}{1}}


have fun