[Bug 1059210] New: spamassassin perl dns resolver recursion desired not set
http://bugzilla.suse.com/show_bug.cgi?id=1059210 Bug ID: 1059210 Summary: spamassassin perl dns resolver recursion desired not set Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Network Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Ralf.Friedl@online.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I have a problem with the DNS tests in spamassassin, it sends out the DNS queries but claims 0 responses. In investigated with tcpdump and found out the the recursion desired (RD) flag is not set on the outgoing packets, so it is no surprise that the resolver doesn't perform the recursion and instead just answers with a list of name servers. spamassassin-3.4.1-53.4.x86_64 perl-base-5.24.1-1.7.x86_64 Here I have a query made with the host program. The '+' after the query id (35303 in this case) indicates that the RD flag is set and the addresses 127.0.0.2 and 127.0.0.3 are returned: 127.0.0.1.45123 > 127.0.0.1.53: 35303+ A? 140.108.140.185.zen.spamhaus.org. (50) 127.0.0.1.53 > 127.0.0.1.45123: 35303 q: A? 140.108.140.185.zen.spamhaus.org. 2/20/0 140.108.140.185.zen.spamhaus.org. A 127.0.0.2, 140.108.140.185.zen.spamhaus.org. A 127.0.0.3 ns: zen.spamhaus.org. ... Here is the query made from spamassassin. In this case, there is no '+' after the query id, and the name server just answers with a list of name servers for the domain. 127.0.0.1.13220 > 127.0.0.1.53: 185 A? 140.108.140.185.zen.spamhaus.org. (50) 127.0.0.1.53 > 127.0.0.1.13220: 185 q: A? 140.108.140.185.zen.spamhaus.org. 0/6/12 ns: org. NS Now in /usr/lib/perl5/vendor_perl/5.24.1/Mail/SpamAssassin/DnsResolver.pm:528 there is a comment "this subroutine mimics the Net::DNS::Resolver::Base::make_query_packet()", but unlike make_query_packet it doesn't set the RD flag. The following patch fixes this for me: --- /usr/lib/perl5/vendor_perl/5.24.1/Mail/SpamAssassin/DnsResolver.pm +++ /usr/lib/perl5/vendor_perl/5.24.1/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 on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1059210
Chenzi Cao
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c1
--- Comment #1 from Ralf Friedl
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at /usr/lib/perl5/vendor_perl/5.26.1/Mail/SpamAssassin/PerMsgStatus.pm line 921.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c2
--- Comment #2 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c3
--- Comment #3 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c4
--- Comment #4 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c5
Peter Varkoly
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c6
--- Comment #6 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c7
--- Comment #7 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
http://bugzilla.suse.com/show_bug.cgi?id=1059210#c10
--- Comment #10 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1059210
Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com