http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5509

           Summary: uribl timeouts do not name the failing rule or zone
           Product: Spamassassin
           Version: 3.2.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Libraries
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


While trying to troubleshoot URIBL timeouts, the following debug
output was not very helpful, seems like uribl timeouts do not
log the rule or zone they are associated with:

dbg: dns: timeout for rfci_envfrom after 6 seconds
dbg: dns: timeout for after 6 seconds
dbg: dns: timeout for after 6 seconds
dbg: dns: timeout for after 6 seconds
dbg: dns: timeout for ahbl after 6 seconds
dbg: dns: timeout for bsp-firsttrusted after 6 seconds
dbg: dns: timeout for after 6 seconds
dbg: dns: timeout for after 6 seconds
dbg: dns: timeout for sorbs-lastexternal,sorbs after 6 seconds

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.


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



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

Reply via email to