You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/01/23 18:19:11 UTC

[Bug 4767] New: spamd loosing net checks if is_dns_available() encounters a single failure

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

           Summary: spamd loosing net checks if is_dns_available()
                    encounters a single failure
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: dallase@nmgi.com


well.. i'm not sure what causes this, but spamd just decides to stop doing dns
tests.  i've seen this happen several times, just never reported it because i
couldnt find any good answer for it.

BEFORE RESTART

# echo -e "From:\n\nhttp://127.0.0.2\n" | spamc
X-Spam-Score: 2.3
X-Spam-Flag: NO
X-Spam-Report: 2.3 points, 3.0 required
        *  0.1 FROM_NO_LOWER From address has no lower-case characters
        * -0.0 NO_RELAYS Informational: message was not relayed via SMTP
        *  0.2 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address in URL
        *  1.8 MISSING_SUBJECT Missing Subject: header
        *  0.1 TO_CC_NONE No To: or Cc: header
        * -0.0 NO_RECEIVED Informational: message has no Received headers

AFTER RESTART

# svc -t /service/spamassassin/
# echo -e "From:\n\nhttp://127.0.0.2\n" | spamc
X-Spam-Score: 27.2
X-Spam-Flag: YES
X-Spam-Report:
        *  0.1 FROM_NO_LOWER From address has no lower-case characters
        * -0.0 NO_RELAYS Informational: message was not relayed via SMTP
        *  0.2 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address in URL
        *  1.6 URIBL_SBL Contains an URL listed in the SBL blocklist
        *      [URIs: 127.0.0.2]
        *  3.0 URIBL_BLACK Contains an URL listed in the URIBL blacklist
        *      [URIs: 127.0.0.2]
        *  2.8 URIBL_PH_SURBL Contains an URL listed in the PH SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  4.5 URIBL_SC_SURBL Contains an URL listed in the SC SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  4.1 URIBL_JP_SURBL Contains an URL listed in the JP SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  3.8 URIBL_AB_SURBL Contains an URL listed in the AB SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  2.1 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  3.0 URIBL_OB_SURBL Contains an URL listed in the OB SURBL blocklist
        *      [URIs: 127.0.0.2]
        *  1.8 MISSING_SUBJECT Missing Subject: header
        *  0.1 TO_CC_NONE No To: or Cc: header
        * -0.0 NO_RECEIVED Informational: message has no Received headers


any clue as to why SA would thing 'net' tests were not available?    spamd never
runs with -L, so net tests should always run assuming working DNS.    

if is_dns_available() fails, $IS_DNS_AVAILABLE becomes 0, and at the top of
is_dns_available(), it automatically returns 0 in the future after a single failure.

  return $IS_DNS_AVAILABLE if (defined $IS_DNS_AVAILABLE);

i know i can set "dns_available yes" in local.cf to avoid this issue, but there
should be a dns check retry interval, if dns_available is set to 'test'

i will attach a patch that will do this..  it adds a config option of
'dns_test_interval' with a default setting of 600 seconds.  below you see i was
testing with a 30 second timeout just to prove it works.

[29318] dbg: dns: dnsopt=test  dnsint=30 diff=26
[29318] dbg: dns: is_dns_available() last checked 26 seconds ago.. dns available=1
[29318] dbg: dns: dnsopt=test  dnsint=30 diff=26
[29318] dbg: dns: is_dns_available() last checked 26 seconds ago.. dns available=1
[29318] dbg: dns: dnsopt=test  dnsint=30 diff=30
[29318] dbg: dns: is_dns_available() last checked 30 seconds ago.. dns available=1
[29318] dbg: dns: dnsopt=test  dnsint=30 diff=30
[29318] dbg: dns: is_dns_available() last checked 30 seconds ago.. dns available=1
[29318] dbg: dns: dnsopt=test  dnsint=30 diff=33
[29318] dbg: dns: is_dns_available() last checked 33 seconds ago.. dns available=
[29318] dbg: dns: testing resolver nameservers: 127.0.0.1
[29318] dbg: dns: trying (3) sourceforge.net...
[29318] dbg: dns: looking up NS for 'sourceforge.net'
[29318] dbg: dns: NS lookup of sourceforge.net using 127.0.0.1 succeeded => DNS
available (set dns_available to override)
[29318] dbg: dns: is DNS available? 1
[29318] dbg: dns: dnsopt=test  dnsint=30 diff=0
[29318] dbg: dns: is_dns_available() last checked 0 seconds ago.. dns available=1



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

[Bug 4767] spamd loosing net checks if is_dns_available() encounters a single failure

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4767





------- Additional Comments From dallase@nmgi.com  2006-01-23 18:20 -------
Created an attachment (id=3337)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3337&action=view)
patch to allow dns retests

patch to allow for later retesting of is_dns_available() in case a failure is
encountered.



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

[Bug 4767] spamd loosing net checks if is_dns_available() encounters a single failure

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4767


dallase@nmgi.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #3337 is|0                           |1
           obsolete|                            |




------- Additional Comments From dallase@nmgi.com  2006-01-23 20:58 -------
Created an attachment (id=3338)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3338&action=view)
1 line update from previous patch

forgot to throw $LAST_DNS_CHECK in use vars




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

[Bug 4767] spamd loosing net checks if is_dns_available() encounters a single failure

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4767


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jm@jmason.org  2006-04-04 13:23 -------
thanks Dallas -- applied to trunk, r391287.



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