Hello David, Looks good...
Friday, November 7, 2003, 10:03:38 PM, you wrote: >>>> Or better: what if we specified in the rule a maximum score to accumulate >>>> to? ... DBF> ... for each rule add two new variables: 'maxhits', default to the DBF> value 1 & 'nhits' init to 0. ... DBF> The score part, added to 'hits' is 'nhits' * score for that rule. DBF> So if you leave maxhits = 1 for each rule (the default), you have DBF> everything working as it does right now. The accumulating part only DBF> kicks in if a "maxhits=n" argument is added to a particular rule. I like it. DBF> Thus you would only need to modify one user-visible part of the DBF> conf stuff, add the "maxhits=" argument. All other rule stuff would DBF> still look & act the same (in default). Good. For readability, and because this is, after all, a scoring parameter, instead of adding it to the regex part of a rule, as in my earlier example, I'd suggest adding it to the score part, as in > score T_SAMPLE 0.5,maxhits=6 DBF> Looking at Robert's 'T_SAMPLE' example from his previous message, DBF> you would implement it as: DBF> body __T_SAMPLE /(?:word1|word2|word3|word4|word5)/i,maxhits=6 DBF> meta T_SAMPLE (__T_SAMPLE) DBF> score T_SAMPLE 0.5 DBF> describe T_SAMPLE Message has medical words frequently used in spam DBF> meta T_SAMPLEA ( __T_SAMPLE > 5 ) DBF> score T_SAMPLEA 2.0 This eliminates the need for T_SAMPLEA altogether. Using your description, simply specify > score T_SAMPLE 0.5,maxhits=5 and the score will be between 0 (no hits), 0.5 (1 hit), and 2.5 (5 or more hits). Bob Menschel ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk