[Exim] condition = and mysql lookup

Página Inicial
Delete this message
Reply to this message
Autor: jmab
Data:  
Para: exim-users
Assunto: [Exim] condition = and mysql lookup
hello i am using exim4.41 and i meet the following problem
when defining a condition:

condition = ${if and { \
                        {eq {'1'} \
                                {${lookup mysql{SELECT loc_on_vacation \
                                FROM t_localmail \
                        WHERE loc_alias='${local_part}@${domain}' \
                        AND loc_is_active=1} {$value}fail}} } \
                {!match {$h_subject:} {ADV} } \
                } {no}{yes}}


what I want is the condition to succeed if the lookup succeeds ans
the "Subject" header doesn't match "ADV".

1)
It seems that for the mysql lookup I have to invert the "{yes}{no}"
to "{no}{yes}", this is strange as the documentation says that
the 1st element is for the true case of the condition.

2)
As I have to play "{no}{yes}" for the mysql lookup to work fine,
I can't use the second condition in the right way.

could someone give some light on this?

thanks alot.

julien