I have 5 different "WEIGHT" tests defined in my global.cfg file...

WEIGHT07 weight  x x 7 0
WEIGHT09 weight  x x 9 0
WEIGHT10 weight  x x 10 0
WEIGHT13 weight  x x 13 0
WEIGHT16 weight  x x 16 0

While perusing the "spam" folder with Spam Manager I've noticed that a
message that gets placed in there with a high weight displays all of the
"WEIGHT" tests that it failed.  For example, if a message had a weight of 12
then it would display...

X-Spam-Tests-Failed: WEIGHT07, WEIGHT09, WEIGHT10 [12]

That's correct. The line "WEIGHT07 weight x x 7 0" says that the E-mail should fail the WEIGHT07 test if it has a weight of 7 or higher. So an E-mail with a weight of 12 should fail the WEIGHT07 test.


It seems sort of redundant to have all of those "WEIGHT"-based Spam Tests
iterated in that field.  I'd like to just have it display the highest one
that it failed or better yet the one that really got it sent to the "spam"
directory.  Is there a cleaner way to handle "WEIGHT" thresholds either with
"WEIGHT" itself or by using a similar "WEIGHT"-type test?  I've seen a
WEIGHTRANGE test bandied about on here but I'm not quite sure how it works?
Can someone give details about WEIGHTRANGE and any others I might not know
of?

"weightrange" is exactly the way to handle this. From the manual:


---
Weight Ranges

For more advanced usage, you can define a test that will only get triggered when a certain range of weights is reached. For example, you can have a test that will only get triggered when the total weight of the E-mail is between 10 and 20.

You can define a weight range test by adding a line in the format "WEIGHT1020 weightrange x x 10 20" (the name of the test, followed by "weightrange", two placeholders, and the low weight and high weight).

Note that this will catch any E-mail with a total weight between 10 and 20, but not if the weight is less than 10, or greater than 20.
---


So in this case, you could use:

WEIGHT07 weightrange  x x 7 8
WEIGHT09 weightrange  x x 9 9
...

-Scott
---
Declude JunkMail: The advanced anti-spam solution for IMail mailservers.
Declude Virus: Catches known viruses and is the leader in mailserver vulnerability detection.
Find out what you have been missing: Ask for a free 30-day evaluation.


---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.

Reply via email to