http://issues.apache.org/SpamAssassin/show_bug.cgi?id=3109
------- Additional Comments From [EMAIL PROTECTED] 2006-04-11 13:38 -------
'But use of net/DNSBL tests in a short-circuit, needs a better way to do this
than causing it to attempt to harvest *all* network lookups early -- I think it
will need a way for the "shortcircuit SC_URIBL_SBL spam" line to cause the meta
dependency chain to be followed up to the network rule, and some logic to
realise that that implies that the URIBL lookups -- and just those -- therefore
need to be waited for before that meta rule can be evaluated correctly.'
'seventh, and this is tricky, do we want to try moving the priorities around
automatically when SC is enabled?'
Update: these two are now implemented in the branch.
It works as follows:
- 1. config is read as normal; priorities are set to whatever they are in the
config file, or 0 by default (including meta rules).
- 2. finish_parsing() calls trace_meta_dependencies(), which recursively
descends the meta dependency tree, so that each meta rule then has a
list of all the rules it depends on (directly or indirectly) in
$conf->{meta_dependencies}.
- 3. finish_parsing() calls fix_priorities(), which then uses that
meta-dependencies list to ensure that each meta rule will run at the same
time as, or later than, all of its dependencies.
- 4. do_meta_tests() in PerMsgStatus then, before it runs each meta rule, greps
out a list of async (ie. network) tests that are dependencies of that rule
(if any). It then checks to see if they've completed; if not, it waits until
it completes (or the async tests time out).
This grepping process takes place once at rule-compile time, not at runtime,
although the completion test runs every time -- however that's 1 or 2 hash
lookups, and there are not many meta rules that depend on network rules.
Finally, META_TEST_MIN_PRIORITY is rendered obsolete, so it's gone.
It all appears to be working, although could probably do with some tidying
up and may have a few bugs ;) In particular I think the rbl_timeout
scaling code probably needs some work, I think it may be cutting off
DNSBL lookups too early now.
Also it needs some speed measurement to see how it now compares with trunk.
Add this file as "rules/62_test.cf", then run "spamassassin -D -t", for a demo:
meta SC_PRI_DEMO ((URIBL_BLACK || URIBL_SC_SURBL) && SPF_SOFTFAIL)
shortcircuit SC_PRI_DEMO spam
priority SC_PRI_DEMO -1000
by the way I am still uncomfortable with "shortcircuit default". I would
prefer to get rid of it, since I think it's one feature too many, unless
there's a good reason for it to be kept.
Dallas, fancy making a case for it? ;)
Also remaining to do: add tests to the test suite for shortcircuiting;
and try it out on my dogfood server.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.