[Exim] Bug in $domain_data caching.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: David Woodhouse
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Bug in $domain_data caching.
--
I think I found a bug where $domain_data isn't provided for lookups
which are cached.

Relevant snippets of log file (http://www.infradead.org/~dwmw2/domain):

At line 144 we see the first lookup succeed and stash the result.

    144:lookup yielded: infradead.org.mail
    145:infradead.org in "lsearch;/etc/exim/dns-virtual-domains"? yes (matched "lsearch;/etc/exim/dns-virtual-domains")
    146:data from lookup saved for cache for +dns_virtual_domains: infradead.org.mail


At line 191 it attempts to verify the recipient address 'asdasd@???'.

At line 210 we see it use the cached result correctly and the
dns_virtual_domains router rewrites asdasd@??? to
asdasd@??? according to the wildcard TXT record
'*.infradead.org IN TXT @phoenix.infradead.org'

    210:--------> dns_virtual_domains router <--------
    211:local_part=asdasd domain=infradead.org
    212:checking domains
    213:cached yes match for +dns_virtual_domains
    214:cached lookup data = infradead.org.mail


At line 456 it again tries to verify, this time with callouts enabled.
However, this time the cached lookup data are _lost_ by the time we
reach the dns_virtual_domains router at line 475:

    475:--------> dns_virtual_domains router <--------
    476:local_part=asdasd domain=infradead.org
    477:checking domains
    478:cached yes match for +dns_virtual_domains
    479:cached lookup data = NULL


The DNS lookup then fails, causing a temporary error, which causes this
machine to operate in MX backup mode and accept the mail (which is to an
unknown recipient as phoenix.infradead.org _would_ have been able to
tell us.

--
dwmw2

--
Content-Description: Forwarded message - [Exim] $domain_data sometimes
    unavailable during callout?


From: David Woodhouse <dwmw2@???>
To: exim-users@???
Subject: [Exim] $domain_data sometimes unavailable during callout?
Sender: exim-users-admin@???
Precedence: bulk
Date: Thu, 22 Jan 2004 12:42:10 +0000

I have a router basically as follows, and was advised that I could use
$domain_data instead of $address_data in it. However it didn't work
during callouts.

The important part of the router is:

domainlist dns_virtual_domains = lsearch;CONFDIR/dns-virtual-domains

dns_virtual_domains:
domains = +dns_virtual_domains
address_data = ${lookup{$domain}lsearch{CONFDIR/dns-virtual-domains}}

I do two recipient verifications in my ACL -- one without a callout, and
the second with a callout, under certain circumstances. I find that the
first routing attempt sets $domain_data OK and everything works, but on
the _second_ I see $domain_data is NULL.

Full working config at http://www.infradead.org/~dwmw2/eximconf

Test logs with working ($address_data) and non-working ($domain_data)
at http://www.infradead.org/~dwmw2/address and
http://www.infradead.org/~dwmw2/domain respectively. Yes, I _did_
remember to replace _all_ instances of $address_data with $domain_data.

This is the important part when it fails...

    --------> dns_virtual_domains router <--------
    local_part=asdasd domain=infradead.org
    checking domains
    cached yes match for +dns_virtual_domains
    cached lookup data = NULL


Yet the cached lookup data should be 'infradead.org.mail' and indeed was
earlier in the same log.

--
dwmw2


--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##

--