W dniu 19.08.2010 09:06, Jonas Forsberg pisze:
> 
> 
> Hello.
> I am fairly new to exim4, so please be patient with me.
> 
> I'm
> trying to get a condition for a router to work as I expect, but I
> clearly have issues understanding the syntax.
> 
> The condition consists of
> two parts:
> 
> 1st a check in the Subject field after a string, that I have
> got to work.
> 
> condition = ${lookup mysql{ 
>  SELECT email FROM users 
> 
> WHERE email='${quote_mysql:$local_pa...@${quote_mysql:$domain}'} 
> 
> {true}{false}}
> 
> 2nd a check in a MySQL table, which I have been
> working.
> 
> condition = ${if match
> {$h_subject:}{N^KalleKalas$N}{yes}{no}}
> 
> but to combine those two into a
> "and rule" makes my head spin. What ever I do exim4 logs that it can not
> expand the condition.

Hello!
If you want to join this two condition with logical "and", it would be
looks in this way:

condition = ${if and{
{lookup mysql{SELECT 1 FROM users WHERE
email='${quote_mysql:$local_pa...@${quote_mysql:$domain}'}}
{if match {$h_subject:}{N^KalleKalas$N}{yes}{no}}}
}

I can't test it, i'm not sure about sql query (mayby it shoud be write
in such way: {eq {1}{SELECT 1 FROM users WHERE
email='${quote_mysql:$local_pa...@${quote_mysql:$domain}'}
)

Regards,
Marcin

-- 
xmpp (jabber): marcin  [at]  mejor.pl

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to