[Exim] $domain_data and nested domainlists

Pàgina inicial
Delete this message
Reply to this message
Autor: Richard.Hall
Data:  
A: exim-users
Assumpte: [Exim] $domain_data and nested domainlists
Hello,

I'm having trouble with nested domainlists and cached lookup data, and
can't decide whether the problem is mine or Exim's ...

Exim 4.12. I've checked the Changelog for 4.14, and can't find anything
relevant. I've also checked the archive, though not exhaustively, so
apologies if I've missed something.

I decided to tidy up my configuration ("If it ain't broke, fix it till it
is") by splitting the local domains into "real" and "virtual" ones. I have
pruned it down as much as possible, and now have

domainlist real_local_domains    = CFGDIR/domains/debug-real-domains
domainlist virtual_local_domains = lsearch;CFGDIR/domains/debug-virtual-domains
domainlist local_domains         = +real_local_domains : +virtual_local_domains


and routers

lookuphost:
driver = dnslookup
domains = ! +local_domains
self = pass
transport = remote_smtp
no_more

virtual_aliases:
driver = redirect
allow_defer
allow_fail
data = ${lookup{$local_part}lsearch*{ALIASDIR/$domain_data}}
domains = +virtual_local_domains
file_transport = address_file
hide_child_in_errmsg
no_more
pipe_transport = address_pipe
qualify_preserve_domain
retry_use_local_part

The other relevant files are:-

debug-real-domains
::::::::::::::::::
my-real.domain.com


debug-virtual-domains
:::::::::::::::::::::
my-virtual.domain.com:          debug-virtual-aliases



debug-virtual-aliases
:::::::::::::::::::::
postmaster:     postmaster@???




A test of -d -bt postmaster@??? gives

routing postmaster@???
--------> lookuphost router <--------
local_part=postmaster domain=my-virtual.domain.com
checking domains
my-virtual.domain.com in "/opt/exim_configuration/domains/debug-real-domains"?
no (end of list)
search_open: lsearch "/opt/exim_configuration/domains/debug-virtual-domains"
search_find: file="/opt/exim_configuration/domains/debug-virtual-domains"
key="my-virtual.domain.com" partial=-1 affix=NULL starflags=0
LRU list:
8/opt/exim_configuration/domains/debug-virtual-domains
End
internal_search_find:
file="/opt/exim_configuration/domains/debug-virtual-domains"
type=lsearch key="my-virtual.domain.com"
file lookup required for my-virtual.domain.com
in /opt/exim_configuration/domains/debug-virtual-domains
lookup yielded: debug-virtual-aliases
my-virtual.domain.com in
"lsearch;/opt/exim_configuration/domains/debug-virtual-domains"? yes (matched
"lsearch;/opt/exim_configuration/domains/debug-virtual-domains")
my-virtual.domain.com in "+real_local_domains : +virtual_local_domains"? yes
(matched "+virtual_local_domains")
my-virtual.domain.com in "! +local_domains"? no (matched "! +local_domains")
data from lookup saved for cache
lookuphost router skipped: domains mismatch
--------> virtual_aliases router <--------
local_part=postmaster domain=my-virtual.domain.com
checking domains
cached yes match for +virtual_local_domains
my-virtual.domain.com in "+virtual_local_domains"? yes (matched
"+virtual_local_domains" - cached)
cached lookup data = NULL
calling virtual_aliases router
rda_interpret (string):
${lookup{$local_part}lsearch*{/opt/exim_configuration/alias_info/$domain_data}}
search_open: lsearch "/opt/exim_configuration/alias_info/"
virtual_aliases router: defer for postmaster@???
message: failed to expand
"${lookup{$local_part}lsearch*{/opt/exim_configuration/alias_info/$domain_data}}":
/opt/exim_configuration/alias_info/ is not a regular file (lsearch lookup)


... which looks odd because the first router claims to have cached the
data from the lookup, while the second says that the match has been cached
but the cached data is NULL.



If I change the definition of local_domains to

domainlist local_domains         = CFGDIR/domains/debug-real-domains : \
                                   lsearch;CFGDIR/domains/debug-virtual-domains


(i.e. don't nest the named lists), the output is now

routing postmaster@???
--------> lookuphost router <--------
local_part=postmaster domain=my-virtual.domain.com
checking domains
search_open: lsearch "/opt/exim_configuration/domains/debug-virtual-domains"
search_find: file="/opt/exim_configuration/domains/debug-virtual-domains"
key="my-virtual.domain.com" partial=-1 affix=NULL starflags=0
LRU list:
8/opt/exim_configuration/domains/debug-virtual-domains
End
internal_search_find:
file="/opt/exim_configuration/domains/debug-virtual-domains"
type=lsearch key="my-virtual.domain.com"
file lookup required for my-virtual.domain.com
in /opt/exim_configuration/domains/debug-virtual-domains
lookup yielded: debug-virtual-aliases
my-virtual.domain.com in "/opt/exim_configuration/domains/debug-real-domains :
lsearch;/opt/exim_configuration/domains/debug-virtual-domains"? yes (matched
"lsearch;/opt/exim_configuration/domains/debug-virtual-domains")
my-virtual.domain.com in "! +local_domains"? no (matched "! +local_domains")
data from lookup saved for cache
lookuphost router skipped: domains mismatch
--------> virtual_aliases router <--------
local_part=postmaster domain=my-virtual.domain.com
checking domains
search_open: lsearch "/opt/exim_configuration/domains/debug-virtual-domains"
cached open
search_find: file="/opt/exim_configuration/domains/debug-virtual-domains"
key="my-virtual.domain.com" partial=-1 affix=NULL starflags=0
LRU list:
8/opt/exim_configuration/domains/debug-virtual-domains
End
internal_search_find:
file="/opt/exim_configuration/domains/debug-virtual-domains"
type=lsearch key="my-virtual.domain.com"
cached data used for lookup of my-virtual.domain.com
in /opt/exim_configuration/domains/debug-virtual-domains
lookup yielded: debug-virtual-aliases
my-virtual.domain.com in
"lsearch;/opt/exim_configuration/domains/debug-virtual-domains"? yes (matched
"lsearch;/opt/exim_configuration/domains/debug-virtual-domains")
my-virtual.domain.com in "+virtual_local_domains"? yes (matched
"+virtual_local_domains")
data from lookup saved for cache
calling virtual_aliases router
rda_interpret (string):
${lookup{$local_part}lsearch*{/opt/exim_configuration/alias_info/$domain_data}}
search_open: lsearch "/opt/exim_configuration/alias_info/debug-virtual-aliases"
search_find: file="/opt/exim_configuration/alias_info/debug-virtual-aliases"
key="postmaster" partial=-1 affix=NULL starflags=1
LRU list:
8/opt/exim_configuration/alias_info/debug-virtual-aliases
8/opt/exim_configuration/domains/debug-virtual-domains
End
internal_search_find:
file="/opt/exim_configuration/alias_info/debug-virtual-aliases"
type=lsearch key="postmaster"
file lookup required for postmaster
in /opt/exim_configuration/alias_info/debug-virtual-aliases
lookup yielded: postmaster@???
expanded: postmaster@???
file is not a filter file
parse_forward_list: postmaster@???
extract item: postmaster@???
virtual_aliases router generated postmaster@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by virtual_aliases router
envelope to: postmaster@???
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Considering postmaster@???



.... it appears that the second router can find the cached lookup data OK.

Am I misunderstanding something, abusing something, or boldly going where
no man has gone before (and regretting it)?

TIA,
Richard Hall