Re: [exim] Preventing TXT lookups after successful acl modif…

Top Page
Delete this message
Reply to this message
Author: Ted Cooper
Date:  
To: exim-users
Subject: Re: [exim] Preventing TXT lookups after successful acl modifier dnslists processing
Thomas Jacob wrote:
>> After a quick look at the source, I think I can say that the default
>> query is all done with a single TXT query. There is no separate query to
>> see if it exists and then another to check the TXT record.
>
> Hmm, maybe I am reading this wrongly (exim 4.67), but isn't
>
> verify.c:2798 if (dns_basic_lookup(&dnsa, query, T_TXT) == DNS_SUCCEED)
>
> only executed if the DNS request for the dnsbl succeeded:
>
> verify.c:2672 if (cb->rc == DNS_SUCCEED)


Well since the first query for a dnslists type condition seems to be
cb->rc = dns_basic_lookup(&dnsa, query, T_A); instead of the default
T_TXT for the 2 other dns resolvers in there, I guess it might not get
returned the first time.

/* If there is no alternate domain, look up a TXT record in the main
domain if it has not previously been cached. */

I guess you're in luck if it's been cached lately!

The dnslists condition doesn't have the features of the dnsdb lookup
which I actually meant to point you to.

http://www.exim.org/exim-html-current/doc/html/spec_html/ch09.html#SECTdnsdb

A mere 31 chapter difference

>> You can heavily modify the behavior of the resolver as laid out in the
>> manual.
>>
>> http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTmorednslists
>
> I read that, but as far as I can see, this only allows one to specify
> what TXT record lookup will done, it doesn't say anything about
> preventing
> this lookup altogether...


Use a ${lookup dnsdb{a=$sender_host_address}{yes}{no}} style query
instead of a dnslists one. I'm sure this will require additional
playing around as you'll have to do a match and/or condition to get it
to work the same way as the dnslists.

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html