http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5509
------- Additional Comments From [EMAIL PROTECTED] 2007-06-14 11:24 -------
> The associated code in Dns.pm harvest_dnsbl_queries is:
> my $string = '';
> if (defined @{$query->{sets}}) {
> $string = join(",", grep defined, @{$query->{sets}});
> }
> elsif (defined @{$query->{rules}}) {
> $string = join(",", grep defined, @{$query->{rules}});
> }
> my $delay = time - $self->{async}->get_last_start_lookup_time();
> dbg("dns: timeout for $string after $delay seconds");
>
> Apart from it failing to report rule names, idioms like:
> defined @{$query->{rules}}
> do not seem right. Perl perlfunc man page says:
>
> Use of defined on aggregates (hashes and arrays) is deprecated.
> It used to report whether memory for that aggregate has ever been
> allocated. This behavior may disappear in future versions of Perl.
actually, that's
grep defined, @{$query->{sets}})
which evals as
grep { defined } @{$query->{sets}}
but slightly more efficiently. still, it's confusing -- and
the improved debugging output is nicer -- so I'm happy to apply
the patch.
> Attached is a patch to make debugging output more informative,
> and fix the @$ref issue. The new printout looks like:
>
> dbg: dns: timeout for openwhois, DNS_FROM_OPENWHOIS, DNSBL-A,
> dns:A:nasserarchitects.com.bl.open-whois.org. after 2 seconds
> dbg: dns: timeout for URI-NS, NS:mycome.hk after 2 seconds
> dbg: dns: timeout for WHOIS_SECUREWHOIS, URI-DNSBL,
> DNSBL:bl.open-whois.org.:mycome.hk after 2 seconds
> dbg: dns: timeout for bsp-firsttrusted, DNSBL-TXT,
> dns:TXT:5.79.187.195.sa-trusted.bondedsender.org. after 2 seconds
> dbg: dns: timeout for URIBL_RHS_DOB, URI-DNSBL,
> DNSBL:dob.sibl.support-intelligence.net:mycome.hk after 2 seconds
thanks -- applied. I also fixed that use of time() inside the loop you
mentioned.
: jm 185...; svn commit -m "bug 5509: improve URIBL timeout debugging messages,
thanks to Mark Martinec" lib/Mail/SpamAssassin/Dns.pm
Sending lib/Mail/SpamAssassin/Dns.pm
Transmitting file data .
Committed revision 547347.
new patch on the way:
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.