[Exim] Trouble setting a condition in Exim 3.34

Top Page
Delete this message
Reply to this message
Author: Paul Miles
Date:  
To: exim-users
Subject: [Exim] Trouble setting a condition in Exim 3.34
Hi,

I am setting up a vacation style Director that sends out a user defined
vacation message. The vacation messages are stored in a MySQL database.

ie, my condition :
condition = ${if eq {} {${lookup mysql {select email from vacation
where user='${quote_mysql:$local_part}'} {$value}}}{no}{yes}}

This all works fine.

My problem at the moment is that vacation reply messages are being sent out
to people when exim expands an email aliases that happens to contain this user.

I tried to change my condition to the following to get around this :

condition =  "${if and { {match {$header_to:}{$local_part}} }    {eq {}
{${lookup mysql {select email from vacation where
user='${quote_mysql:$local_part}'} {$value}}}{no}{yes}}}"


My theory being only to send out vacation message replys if the header to
address contains the local username. This is obviously not fool proof but
should serve my purposes.

But I just can't seem to get the syntax right - somebody please help me!

Many thanks in advance,

Paul Miles