I am using exim 3.0.
I have a case of a router which is to be used only for a certain
domain, and then only for certain local_parts in that domain. It
appears to work fine. However, the local_user lookup is run for all
domains, and then the domain is checked even if the local part test
fails. Would it not be be more efficient to check the domain first
and then the local part only if it is the correct domain ? And, why
doesn't it fail right away after failing the local_part test ? If I
comment out the domain test, it fails due to the local_part test as
it should.
#--- this router will send local xwave addresses back through the directors
xwave_local:
driver = domainlist
domains = xwavesolutions.com
local_parts = ${lookup {${lc:$local_part}} dbm {/usr/exim/xwave.local} {$local_part} {fail}}
route_list = * localhost byname
self = local
Here is the relevant part of the output from
exim -N -d9 -C /usr/exim/configure.test -bm test@???
routing test@???, domain junk.com
search_open: dbm "/usr/exim/xwave.local"
search_find: file="/usr/exim/xwave.local"
key="test" partial=-1
LRU list:
1/usr/exim/xwave.local
End
internal_search_find: file="/usr/exim/xwave.local"
type=dbm key="test"
file lookup required for test
in /usr/exim/xwave.local
lookup failed
junk.com in "xwavesolutions.com"? no (end of list)
xwave_local router skipped: domain mismatch
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rick Ballard Phone : 902-481-4548
Software Kinetics Ltd. Fax : 902-468-3679
Dartmouth,NS,Canada Email : Rick.Ballard@???
Timezone: Atlantic AST(GMT-4)/ADT(GMT-3)
--
*** Exim information can be found at
http://www.exim.org/ ***