Re: [exim] Using MySQL "INSTR" function fails exim-4.62

Pàgina inicial
Delete this message
Reply to this message
Autor: Matt Judge
Data:  
A: exim-users
Assumpte: Re: [exim] Using MySQL "INSTR" function fails exim-4.62
Tony Finch wrote:
> ${lookup has ${if functionality built in, so try simply
>
> condition = ${lookup mysql{SELECT 1 FROM domain_whitelist WHERE INSTR('test@???', '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: test@???
>>> 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('test@???', b.address);
+---+
| 1 |

+---+


Cheers,

Matt.