b-sub-...@rope.net wrote: > On Sun, 17 May 2009, Matt Kettler wrote: > > >>> Could someone please show me how I could alter this frivilous rule to use >>> shortcircuit: >>> >>> body SA1 /dear friend/i >>> describe SA1 SA - dear friend >>> score SA1 13 >>> # Score of 12 is enough to classify as spam >>> >>> >> You need to do two things. >> >> First, you probably want to set the priority of the rule so it runs >> before others, to get maximum benefit out of shortcircuiting. Second, >> you turn on Shortcirucuit for the rule. >> >> Which would be these two lines: >> >> priority SA1 -100 >> shortcircuit SA1 on. >> > > Q. The lower the priority value, the higher the priority? i.e. -100 is > higher priority than 0, and would be processed earlier? > Correct. See the Mail::SpamAssassin::Conf manpage.
http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html Which describes the priority config option: * priority SYMBOLIC_TEST_NAME n Assign a specific priority to a test. All tests, except for DNS and Meta tests, are run in increasing priority value order (negative priority values are run before positive priority values). The default test priority is 0 (zero).* > So my ruleset would look like this(?): > > body SA1 /dear friend/i > describe SA1 SA - dear friend > score SA1 13 > priority SA1 -100 > shortcircuit SA1 on > > Q. Does the order these rules are entered make a difference? > Define "these rules".. Do you mean the does the order of the options to the rule matter? In general no, but the "body" or other keyword that actually creates the rule needs to occur before any of the others. From there, options like describe, score, priority, shortcircuit, tflags, etc can occur in any order. If you're talking about actually having multiple rules like the one above, then the order might matter. However, if it really matters which ones run first, use different priorities to ensure the order you want occurs. ie: put your first ones at -100, then -99, then -98, etc. However, try not to get over-zealous with the priorities. Having a lot of priorities is not terribly efficient. If nothing else, consider the implications on your memory cache of having to jump back to the start of the message, over and over again. Where practical, try to group your rules together in the same priority.