Tony Finch wrote:
> On Sat, 11 Jun 2005, Thomas Mueller wrote:
> 
>>The condition posted above works as expected now, but it doesn't work if
>>I add a where clause:
>>condition = ${if match{$local_part}{${lookup pgsql{SELECT '([0-9]+)' \
>>      WHERE '${quote_pgsql:$domain}' = 'tmueller.com'}}}{yes}{no}}
>>
>>This matches always, even something like [EMAIL PROTECTED]
>>match{$local_part}{} seems to be true?
> 
> I guess that'll be because if the WHERE clause is false the result of the
> lookup is the empty string, and every string matches the null regex.

Thanks for your help Tony.

This is a ugly hack, but shouldn't this work then:
condition = ${if match{X$local_part}{X${lookup pgsql{SELECT '([0-9]+)' \
    WHERE '${quote_pgsql:$domain}' = 'tmueller.com'}}}{yes}{no}}

It doesn't, it matches always too.


Thomas


-- 
## 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