Re: [exim-dev] [PATCH] Add support for SPF records in dnsdb …

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: Janne Snabb
CC: exim-dev
Temat: Re: [exim-dev] [PATCH] Add support for SPF records in dnsdb lookups
On 2012-05-18 at 19:28 +0000, Janne Snabb wrote:
> On Fri, 18 May 2012, Janne Snabb wrote:
>
> > Yes, thank you! How about something like this additional patch?
>
> Oops, the previous patch was incorrect. It was checking for "type ==
> T_SPF" before the type was defined. This should be better. Sorry about
> the noise.


No apologies needed; I should have done a -be test before committing,
not just checking that it compiles without warning.

I've applied this fix too, leaving it in the ChangeLog as part of the
previous adjustment. I've de-initialised "type" in the stack vars, only
initialising it just before where it may be overriden, so that a repeat
of this mistake should lead to compiler warnings of referencing
uninitialised variables. Best to not be caught out twice.

I went to add DNS records to my test zone and found that I in fact
already had them. So I ran these checks against before & after
binaries, to confirm the fix was working:

${lookup dnsdb{spf=spftest2.test.globnix.net}}
${lookup dnsdb{spf=spftest3.test.globnix.net}}

I've also just added spftest4, spftest5 and spftest6 to DNS, so folks
can see how SPF resolvers deal with multiple records in practice. No
TXT records for those entries. Not being tested here, since this is
dnsdb and it's not our concern, we just return the requested data.

-Phil