[Exim] verify and condition (2)

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Chambers
Datum:  
To: exim-users
Alte Treads: Re: [Exim] verify and condition
Betreff: [Exim] verify and condition (2)
Further to my earlier message about using def:message_id in a condition to detect if
a router was being used in verify mode I have encountered a problem. (I realise
that the proposed condition in that message was not valid!)

I used the condition:

  condition = ${if and{{def:message_id}\
                       {eq{yes}{${run {/.../script.pl $local_part $message_id}\
                                  {yes}{yes}}}}}{yes}{yes}}


This should always return "yes" but is intended to use the "and" condition to
control whether the "run" takes place. The spec says that "and" is processed from
left to right, so I assumed that if the first part (def:message_id) returned false
exim would stop at that point and not evaluate the second part (the ${run ..} part).

However, exim always invokes the perl script, even when $message_id is null. Does
that mean that exim always evaluates all the components of an "and" before deciding
if the result is true?

It is always possible, of course, that I screwed up the condition as I always find
these very difficult to work out.

Phil.
---------------------------------------
Phil Chambers (postmaster@???)
University of Exeter