https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7265

--- Comment #16 from Mark Martinec <[email protected]> ---
(In reply to Quanah Gibson-Mount from comment #10)
> > --- lib/Mail/SpamAssassin/Plugin/DKIM.pm        (revision 1715244)
> > +++ lib/Mail/SpamAssassin/Plugin/DKIM.pm        (working copy)
> > -        my $res = $self->{main}->{resolver}->get_resolver;
> > +        my $res = $self->{main}->{resolver};
> > +        dbg("dkim: providing our own resolver: %s", ref $res); 
> I think this fix is incomplete, as Mail::DKIM also uses the Net::DNS
> resolver at: [...]
> which is around line 1046 in DKIM.pm.  I would expect we want to use the
> native resolver in both places?

You are right, it would make sense to use the same resolver in both
places in the DKIM plugin.

Now that 1.04 reverted the incompatible 'retry' semantics change, we
have again a choice of using the Net::DNS resolver object with our
settings (the one at {resolver}->get_resolver), or to use our private
send/receive methods as other DNS lookups in SA use (i.e. our private
resolver object at $self->{main}->{resolver}).

The benefit of using the Net::DNS native resolver is that it falls back
to a TCP query in case the UDP reply returns a 'truncated' flag (which
can happen with long DKIM public keys and a local recursive DNS server
not supporting EDNS0 long packets, or having some broken firewall in
the path. The benefit of using our own send/receive code is some
independence of future changes in Net::DNS. Haven't decided what would
be the best choice.


> I'm seeing a really odd issue atm with SA 3.4.1 and Net::DNS 1.04.
> I've now backed out the Net::DNS 1.03 specific changes to SA to see
> if that resolves it.
> Basically since I deployed Net::DNS 1.04 and SA 3.4.1 patched,
> I'm seeing a lot of:
> Dec 10 20:24:46 zre-ldap002 postfix/amavisd/smtpd[31292]: timeout after 
> END-OF-MESSAGE from localhost[127.0.0.1]
> However, since amavisd *also* uses Net::DNS via 
> Net::DNS::Resolver::Programmable, > I don't know if the problem is with 
> Amavis or SA's usage of Net::DNS. ;)

Amavis does not use Net::DNS::Resolver::Programmable, nor Net::DNS.
All that amavis has to do with Net::DNS is to provide a pre-built
Net::DNS::Resolver object and pass it to Mail::DKIM.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to