At 21:28 2003-10-25 -0600, Lukreme wrote:
[snip]
A negative score is not spam.
Which is why he's compensating in the rule.
Before we go over it (using a SANDBOX), let's point out that the:
* $MATCH^0
doesn't work, because the variable isn't properly expanded. You need to
use the $ condition modifer flag:
* $ $MATCH^0
Original conditions (with fix for above variable expansion):
* ^X-Spam-Score:[^0-9.]*\/[0-9.]+
* -9.876^0
* $ $MATCH^0
If message arrives with X-Spam-Score: -8.42 (fine, so it isn't spam):
procmail: Assigning "MATCH="
procmail: Matched "8.42"
procmail: Match on "^X-Spam-Score:[^0-9.]*\/[0-9.]+"
procmail: Score: -9 -9 ""
procmail: Score: 8 -1 ""
Ok, not flagged as spam, right? Kewl. But note that the MATCH variable
was 8.42 *NOT* -8.42 - the more NOT spammy it is, the more likely it'll get
flagged as spam because the unsigned value will exceed the POSITIVE spam
threshold being checked for. So, a -10 spam score would ACTUALLY be
flagged as spam by the original recipe. That's of course, not good.
Now, look at the revised recipe:
:0
* ^X-Spam-Score:[^0-9.]*\/-?[0-9.]+
* -4.987^0
* $MATCH^0
Which nets:
procmail: Assigning "MATCH="
procmail: Matched "-8.42"
procmail: Match on "^X-Spam-Score:[^0-9.]*\/-?[0-9.]+"
procmail: Score: -4 -4 ""
procmail: Score: -8 -13 ""
i.e. a very NEGATIVE score. The bigger the NEGATIVE value of the
spammishness score, the bigger the negative of the procmail scoring - which
is how it should be.
I didn't follow the discussion close enough to care why the scoring
adjustment was halved (I don't use SA and don't plan to).
BTW, a few days ago, there was some rambling under this same topic about
something which boiled down to the following construct:
:0
* ^X-Spam-Score:.*\*\*\*\*\*\*\*
Junk
Besides lacking the lockfile flag (and, isn't the -Score a strict numeric,
with -Level being the repeating symbol line?), which should be corrected,
I've previously pointed out a somewhat more intuitive way to do this so
that you score it by number:
:0:
* ^X-Spam-Level: \/[*]+
* -6^0
* ^1^1 MATCH ?? (\*)
-6 is ONE less than the limit you're defining (in the previously discussed
filter, there's seven escaped asterisks, so here, you'll have a +1 score).
Alternatley, if you want a single number threshold EQUAL to the number of
asterisks, simply add the following:
* 1^0
Then set the negative baseline equal to the number you consider to be spam.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail