Re: [exim] problem with ${if } in nested and {} condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John Horne
Date:  
À: Exim users
Sujet: Re: [exim] problem with ${if } in nested and {} condition
On Thu, 2010-02-18 at 23:34 +0100, Marten Lehmann wrote:
> Hi,
>
> >> I need to build a condition with nested if-s, but I cannot get it work:
> >>
> >>     defer   condition     = ${if  and { \
> >>                                           { \
> >>                                                   ${if eq{}{} \
> >>                                                   {true} \
> >>                                                   {false} } \
> >>                                           } \
> >>                                           {eq{}{}} \
> >                                             ^^^^^^^^

> >
> > I would say that is the problem. It needs to be an '${if' expression.
> > Try replacing just that line with: {${if eq {} {} }} \
>
> no, thats not the problem. Furthermore, this code works fine:
>

Yes, my mistake. Apologies.

Could you not use multiple 'condition' statements:

condition = ${if eq {} {} }
condition = ${if eq {} {} {true} {false} }

These are in effect 'anded' together.


John.

-- 
John Horne, University of Plymouth, UK
Tel: +44 (0)1752 587287    Fax: +44 (0)1752 587001