Re: [exim] ACL senders= vs. MySQL (list expansion)...bug?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Andreas Haschka
CC: exim-users
Sujet: Re: [exim] ACL senders= vs. MySQL (list expansion)...bug?
On Thu, 3 May 2007, Andreas Haschka wrote:

> 1977 check senders = mysql;SELECT 'good@???' :
> 1977 address match: subject=bad@??? pattern=mysql;SELECT
> 'good@???'
> 1977 search_open: mysql "NULL"
> 1977 search_find: file="NULL"
> 1977 key="SELECT 'good@???'" partial=-1 affix=NULL starflags=0
> 1977 LRU list:
> 1977 internal_search_find: file="NULL"
> 1977 type=mysql key="SELECT 'good@???'"
> 1977 database lookup required for SELECT 'good@???'
> 1977 MYSQL query: SELECT 'good@???'
> 1977 MYSQL new connection: host=localhost port=0 socket=NULL
> database=NULL user=root
> 1977 lookup yielded: good@???
> 1977 bad@??? in "mysql;SELECT 'good@???' :"? yes
> (matched "mysql;SELECT 'good@???'")
> 1977 accept: condition test succeeded
>
> So what's the deal here?


You've confused the two different lookup syntaxes. Since your query
delivers a list of addresses to check, you need to use the

${lookup mysql{SELECT....

syntax. The mysql;SELECT... syntax in a lookup means "if this lookup
succeeds, the thing we are looking for matches". It has, so it does.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book