http://issues.apache.org/SpamAssassin/show_bug.cgi?id=3109
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3427 is|0 |1
obsolete| |
------- Additional Comments From [EMAIL PROTECTED] 2006-03-23 04:46 -------
Created an attachment (id=3428)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3428&action=view)
shortcircuit patch with meta/dns priority support
okay, i found shortcircuit on body, rawbody and header tests only to be very
boring... other than user-defined white/black lists, there is really not much
else that you can make a good shortcircuit descision on (at least in the
default rules). so, i started messing around with the harvest priorities and
found that it is quite simple to accomplish prioritized dns and meta rules.
attached is a updated patch against 3.1.1 that will allow this, and give you
alot more power with shortcircuiting of meta tests. you just have to make sure
the tests your meta's rely on have higher priorities than the meta tests
themselves. works great as long as you order your priorities correctly.
i've seen the loads disappear on some dedicated spamd servers tonite :)
when meta rules are created, they are set with a priority of 500 by default,
which is what the constant HARVEST_DNSBL_PRIORITY was previously set that.
This caused all metas test to not even be evaluated until all the default
priority rules had ran, which was what needed to happen. However, this
prevented proper prioritization on the meta rules. By changing
HARVEST_DNSBL_PRIORITY to -500, this allows it to evaluate any meta in a
priority group > -500 prior to the cpu heavy rules. if you do not define any
metas with < 0 priorities, they just works like they always have, running at
priority 500.
So, now you can do something that is actually worthwile.. like
# must define dns based tests at a priority > -800
# must define meta priorities > -500 and < any dns test priority it relies on.
priority URIBL_BLACK -500
priority URIBL_JP_SURBL -500
priority URIBL_SC_SURBL -500
priority URIBL_OB_SURBL -500
meta SC_MULTI_RHSBL ( URIBL_BLACK && (URIBL_JP_SURBL || URIBL_SC_SURBL ||
URIBL_OB_SURBL ))
priority SC_MULTI_RHSBL -100
shortcircuit SC_MULTI_RHSBL spam
[31446] dbg: config: read file /usr/share/spamassassin/60_shortcircuit.cf
[31446] dbg: check: running tests for priority: -1000
[31446] dbg: priority: running high priority (-1000) eval USER_IN_WHITELIST
[31446] dbg: priority: running high priority (-1000) eval USER_IN_ALL_SPAM_TO
[31446] dbg: priority: running high priority (-1000) eval USER_IN_DEF_WHITELIST
[31446] dbg: priority: running high priority (-1000) eval SUBJECT_IN_WHITELIST
[31446] dbg: check: running tests for priority: -950
[31446] dbg: priority: running high priority (-950) eval ALL_TRUSTED
[31446] dbg: check: running tests for priority: -900
[31446] dbg: priority: running high priority (-900) eval USER_IN_BLACKLIST_TO
[31446] dbg: priority: running high priority (-900) eval USER_IN_BLACKLIST
[31446] dbg: priority: running high priority (-900) eval SUBJECT_IN_BLACKLIST
[31446] dbg: check: running tests for priority: -500
[31446] dbg: priority: running high priority (-500) eval URIBL_BLACK
[31446] dbg: priority: running high priority (-500) eval URIBL_JP_SURBL
[31446] dbg: priority: running high priority (-500) eval URIBL_OB_SURBL
[31446] dbg: priority: running high priority (-500) eval URIBL_SC_SURBL
[31446] dbg: check: running tests for priority: -100
[31446] dbg: priority: running high priority (-100) meta SC_URIBL_HASH
[25755] dbg: shortcircuit: hit on rule SC_MULTI_RHSBL, sc type is spam, apply
score of 100
and whitelists/blacklists running at a higher priority like -1000 and -900 will
prevent check_post_dnsbl from ever firing of dns queries because the
HARVEST_DNSBL_PRIORITY does not kick in until the priority group reaches -800.
[22242] dbg: check: running tests for priority: -1000
[22242] dbg: priority: running high priority (-1000) eval USER_IN_WHITELIST
[22242] dbg: shortcircuit: hit on rule USER_IN_WHITELIST, sc type is default,
apply score of -100
so now we are getting somewhere! ;)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.