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

            Bug ID: 7476
           Summary: SpamAssassin/DnsResolver.pm doesn't set recursion
                    desired on DNS requests with newer Perl Net-DNS
           Product: Spamassassin
           Version: 3.4.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

I have SpamAssassin 3.4.1.

SpamAssassin/DnsResolver.pm:577 creates a new DNS request by calling
Net::DNS::Packet->new().

Somewhere between
http://cpansearch.perl.org/src/NLNETLABS/Net-DNS-0.83/lib/Net/DNS/Packet.pm and
http://cpansearch.perl.org/src/NLNETLABS/Net-DNS-1.01/lib/Net/DNS/Packet.pm
Net::DNS::Packet->new() was changed to no longer set recursion desired in the
DNS request. As a result, SpamAssassin sends the DNS requests and waits for the
answers, but the answers don't have a response, because recursion desired is
not set.

This can be fixed by this patch. With older Net-DNS it is not necessary, but it
doesn't hurt.
--- Mail/SpamAssassin/DnsResolver.pm
+++ Mail/SpamAssassin/DnsResolver.pm
@@ -575,6 +575,7 @@
                 { $1 eq '\\' ? "\\$1" : sprintf("\\%03d",ord($1)) }xgse;

     $packet = Net::DNS::Packet->new($domain, $type, $class);
+    $packet->header->rd (1);

     # a bit noisy, so commented by default...
     #dbg("dns: new DNS packet time=%.3f domain=%s type=%s id=%s",

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

Reply via email to