Re: [Exim] Simple syntax error?

Top Page
Delete this message
Reply to this message
Author: Nigel Wade
Date:  
To: Paul Furness, Exim users list
Subject: Re: [Exim] Simple syntax error?
Paul Furness wrote:
> Hello.
>
> I'm trying to get this to work in my exim.conf (exim 4.30):
>
> # Add a "Quarantine" flag for spam scoring more than 6 but less than 8.
>   warn  message = X-Spam-Quarantine: Yes
>         spam = nobody:true
>         condition = ${if >{$spam_score_int}{60}{${if
>                                      <{$spam_score_int}{80}{1}{0}}}{0}}

>
> (the condition line isn't really split over 2 lines, but this is an
> email).
>
> The problem is that whatever the spam score actually is, this condition
> fails. Am I missing something really basic about the syntax of the
> rules?
>
> Oh, incidentally, this works:
>
>         condition = ${if >{$spam_score_int}{60}{1}{0}}

>
> but doesn't do what I want.
>
> Thanks.
>
> Paul.
>
>


I can't see anything wrong with that clause, but can you change the
condition so that it uses and rather than nested ifs?

E.g. (not tested!)

condition = ${if and { \
                    { >{$spam_score_int}{60}} \
                    { <{$spam_score_int}{80}} \
                  } {1}{0} \
              }


--
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555