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: [email protected]
ReportedBy: [EMAIL PROTECTED]
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.