Re: [Exim] Maybe another subcondition syntax error

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Oliver Egginger
Datum:  
To: exim-users
Betreff: Re: [Exim] Maybe another subcondition syntax error
There's your problem. That is no longer a condition.

I see!
So I have (in the context of a router condition) to substitute
nested if statatement by "and" and "or".

To completing this task here is the working condition:

condition = \
  "${if and { {!def:h_X-Spam-Flag:} \
              {!eq {$received_protocol}{spam-scanned}} \
              {or { {eq {$sender_host_address}{212.201.18.80}} \
                    {eq {$sender_host_address}{212.201.18.81}} \
                  }\
              }\
            }\
            {1}{0}\
    }"



- oliver

Am Mit, 2003-05-07 um 16.17 schrieb Philip Hazel:
> On 7 May 2003, Oliver Egginger wrote:
>
> > condition = \
> > "${if and { {!def:h_X-Spam-Flag:} \
>
> "and" is followed by { and then a number of {} conditions. You have the
> first one here. So far so good.
>
> >             {!eq {$received_protocol}{spam-scanned}} \

>
> And there's a second condition. Still goodl
>
> >             {${if or { {eq {$sender_host_address}{212.201.18.80}} \
> >                        {eq {$sender_host_address}{212.201.18.81}} \

>
> There's your problem. That is no longer a condition. "${if" is not the
> name of a condition. However "or" is the name of a condition - its
> arguments are a list of conditions inside {}. You want something like
>
> ${if {  {Acond1}
>         {Acond2}
>         {                     |   All of this is the third condition
>         or {  {Ocond1}        |   for the "and"
>               {Ocond2}        |
>            }                  |
>         }                     |
>      }
>   ...

>
> (I haven't bothered with the \ continuations, or completed the whole
> thing.
>
> > What is a "condition name"?
>
> One of the things that may follow "${if", such as "eq", "and", or "or".

--
Oliver Egginger <Oliver.Egginger@???>
Fachochschule Giessen-Friedberg