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 2015/10/20 19:54:29 UTC
[Bug 7256] New: URI Host rule duplicates
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
Bug ID: 7256
Summary: URI Host rule duplicates
Product: Spamassassin
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Rules
Assignee: dev@spamassassin.apache.org
Reporter: rwmaillists@googlemail.com
There look to be some rule duplicates:
body URI_HOST_IN_BLACKLIST eval:check_uri_host_in_blacklist()
header HEADER_HOST_IN_BLACKLIST eval:check_uri_host_listed('BLACK')
body URI_HOST_IN_WHITELIST eval:check_uri_host_in_whitelist()
header HEADER_HOST_IN_WHITELIST eval:check_uri_host_listed('WHITE')
check_uri_host_in_blacklist() is equivalent to check_uri_host_listed('BLACK')
and the whitelist versions are analogous.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7256] URI Host rule duplicates
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
Amir Caspi <ce...@3phase.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cepheid@3phase.com
--- Comment #3 from Amir Caspi <ce...@3phase.com> ---
(In reply to Joe Quinn from comment #1)
> Can you construct an example of where they should be different but are not?
In the SA user list, I posted two spamples where HEADER_HOST_IN_BLACKLIST pops
but the specified BL host is absolutely _not_ in the header. This is, in fact,
how this issue was first discovered.
Spample #1: http://pastebin.com/vpXAVjaH
Spample #2: http://pastebin.com/B3kFg4Xn
In both cases, the BL host appears in the body, not in the headers. Thus, the
eval is apparently not distinguishing between header and body, causing the
HEADER rules to hit erroneously.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7256] URI Host rule duplicates
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
Karsten Bräckelmann <gu...@rudersport.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Karsten Bräckelmann <gu...@rudersport.de> ---
You are both correct, RW and Amir.
The eval() rule is the same in URI_HOST_IN_BLACKLIST and its HEADER_*
counterpart (one variant is just a named shortcut to the general
check_uri_host_listed() function).
With eval() rules, defining the rule as header or body does NOT limit the eval
function's scope but determines only which part of the message the rule's score
should be accounted for.
Minimal test case: Ad-hoc message with no headers, header-body separator, and a
URI in the body. Fed to spamassassin with a user URI blacklist option of the
entire TLD .org.
$ echo -e "\n\n spamassassin.apache.org" |
./spamassassin -L --cf="blacklist_uri_host org"
Relevant header excerpt showing the _REPORT_ template tag rules's hit:
X-Spam-Report:
* 100 HEADER_HOST_IN_BLACKLIST Host or Domain in header is listed in the
* user's URI black-list
* [URI: spamassassin.apache.org (org)]
* 100 URI_HOST_IN_BLACKLIST BODY: Host or Domain is listed in the user's
* URI black-list
* [URI: spamassassin.apache.org (org)]
Removed HEADER_HOST_IN_BLACKLIST and *_WHITELIST rules. Committed to trunk and
stable 3.4 branch respectively.
Sending rules/60_whitelist.cf
Committed revision 1812594.
Sending rules/60_whitelist.cf
Committed revision 1812595.
Closing RESOLVED FIXED.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7256] URI Host rule duplicates
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
RW <rw...@googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rwmaillists@googlemail.com
--- Comment #2 from RW <rw...@googlemail.com> ---
I don't see any evidence in the code for separate header tests, and the result
cache that check_uri_host_listed() uses has a single boolean per list.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7256] URI Host rule duplicates
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
Kevin A. McGrail <km...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmcgrail@apache.org
--- Comment #5 from Kevin A. McGrail <km...@apache.org> ---
svn commit -m 'small rule artifact fix bz 7256'
Sending 50_scores.cf
Transmitting file data .
Committed revision 1880225.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7256] URI Host rule duplicates
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256
Joe Quinn <jq...@pccc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jquinn+SAbug@pccc.com
--- Comment #1 from Joe Quinn <jq...@pccc.com> ---
They are header and body alternatives. If the eval calls are identical, it's a
bit silly to be using different forms for each rule but otherwise they aren't
duplicates.
Can you construct an example of where they should be different but are not?
--
You are receiving this mail because:
You are the assignee for the bug.