Re: [exim] PGSQL: no data found - when dns lookup fail

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Marcin Mirosław
日付:  
To: exim-users
題目: Re: [exim] PGSQL: no data found - when dns lookup fail
I've got another one quesion.
In conf file i've got:

domainlist local_domains = localhost : @ : \
${lookup pgsql {SELECT domena FROM exim_users where \
domena='${quote_pgsql:$domain}' limit 1 }}: \
${lookup pgsql {select regexp_replace(alias, '.*@','') \
from exim_aliasy where alias like '%@${quote_pgsql:$domain}' }}

acl_check_rcpt:
[...]
deny
      !hosts          = : +relay_from_hosts
      sender_domains  = +local_domains
      message         = You are not authenticated



fake debug session:

processing "deny"
check domains = +local_domains
search_open: pgsql "NULL"
search_find: file="NULL"
key="SELECT domena FROM exim_users where domena='xxxkolekcja.mejor.pl'
limit 1 " partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=pgsql key="SELECT domena FROM exim_users where
domena='xxxkolekcja.mejor.pl' limit 1 "
database lookup required for SELECT domena FROM exim_users where
domena='xxxkolekcja.mejor.pl' limit 1
PostgreSQL query: SELECT domena FROM exim_users where
domena='xxxkolekcja.mejor.pl' limit 1
PGSQL new connection: host=127.0.0.1 port= database=exim user=eximuser
PGSQL: no data found
lookup failed
search_open: pgsql "NULL"
cached open
search_find: file="NULL"
key="select regexp_replace(alias, '.*@','') from exim_aliasy where
alias like '%@xxxkolekcja.mejor.pl' " partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=pgsql key="select regexp_replace(alias, '.*@','') from
exim_aliasy where alias like '%@xxxkolekcja.mejor.pl' "
database lookup required for select regexp_replace(alias, '.*@','') from
exim_aliasy where alias like '%@xxxkolekcja.mejor.pl'
PostgreSQL query: select regexp_replace(alias, '.*@','') from
exim_aliasy where alias like '%@xxxkolekcja.mejor.pl'
PGSQL using cached connection for 127.0.0.1/exim/eximuser
PGSQL: no data found
lookup failed
xxxkolekcja.mejor.pl in "localhost : @ : : "? no (end of list)
xxxkolekcja.mejor.pl in "+local_domains"? no (end of list)
deny: condition test failed


Meseems that all condition is failed because pgsql lookup is failed. I
don't know how to change config to have exim treating empty result from
sql query as valid lookup. Is it possible?
Regards,
Marcin