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

--- Comment #8 from Mark Martinec <[email protected]> ---
> Actually DNS resolving in a DKIM plugin seems to be still broken.
> Working on it...

The DKIM plugin was broken by Net::DNS 1.03 for a different reason:

- Net::DNS 1.03 has a bug in that it sends a barrage of queries
  up to a retry count in one go, with a timeout of 0, so it
  depends on a luck and a DNS resolver's cache whether a reply
  is received in a few milliseconds or not - which is why a dkim
  test fails more likely then not. This bug is still undocumented.

- our fix (in a proposed patch above) would be able to avoid the
  bug in Net::DNS, but due to a bug in Mail/SpamAssassin/Plugin/DKIM.pm
  it failed to provide our own resolver to Mail::DKIM, so it used
  the problematic Net::DNS::Resolver;


This now fixes our bug in MS::Plugin::DKIM:

--- lib/Mail/SpamAssassin/Plugin/DKIM.pm        (revision 1715244)
+++ lib/Mail/SpamAssassin/Plugin/DKIM.pm        (working copy)
@@ -794,7 +794,8 @@
         # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
         # as our interface does not provide a DNS fallback to TCP, unlike
         # the Net::DNS::Resolver::send which does provide it.
-        my $res = $self->{main}->{resolver}->get_resolver;
+        my $res = $self->{main}->{resolver};
+        dbg("dkim: providing our own resolver: %s", ref $res);
         Mail::DKIM::DNS::resolver($res);
       }
     }


trunk:
  Sending lib/Mail/SpamAssassin/Plugin/DKIM.pm
Committed revision 1715245.

3.4:
  Sending lib/Mail/SpamAssassin/Plugin/DKIM.pm
Committed revision 1715248.

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

Reply via email to