Tony Finch wrote:
> ${lookup has ${if functionality built in, so try simply
>
> condition = ${lookup mysql{SELECT 1 FROM domain_whitelist WHERE INSTR('[EMAIL 
> PROTECTED]', 'google')} }
>
> (You might be having problems with extra whitespace, maybe. Try running
> with -d+all-memory.)
>
> Tony.
>   


Removing the ${if fixed it for the literal but not for the string 
substitution.

mail from: [EMAIL PROTECTED]
 >>> processing "accept"
 >>> check condition = ${lookup mysql{SELECT '1' FROM domain_whitelist 
AS b, vdomains AS v WHERE INSTR('${quote_mysql:$h_from:}', b.address)}}
 >>>                 =
 >>> accept: condition test failed

 From the MySQL command line:

mysql> SELECT '1' FROM domain_whitelist AS b, vdomains AS v WHERE 
INSTR('[EMAIL PROTECTED]', b.address);
+---+
| 1 |
+---+


Cheers,

Matt.

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

Reply via email to