Mailing List Archive

[SpamAssassin Wiki] Updated: RoundingIssues
Date: 2004-06-20T16:19:37
Editor: DanKohn <dan@dankohn.com>
Wiki: SpamAssassin Wiki
Page: RoundingIssues
URL: http://wiki.apache.org/spamassassin/RoundingIssues

no comment

Change Log:

------------------------------------------------------------------------------
@@ -1,15 +1,12 @@
-== Why is the number of stars rounded down? ==
+== Why do the message score and the number of stars show something different? ==

-The number of stars given by the _STARS_ tag (as commonly seen in the X-Spam-Level header) are rounded down as this header is often used for filtering. If someone set their threshold to 5 and filtered based on the presence of 5 stars, a spam with a score of 4.5 would be filtered (4.5 rounds to 5, so 5 stars would be shown)
+Upgrade to 3.0 and they shouldn't anymore. This was a common question and was filed as a [http://bugzilla.spamassassin.org/show_bug.cgi?id=2607 bug] and fixed.

-== Why isn't the message score rounded? ==
+If the score of a spam is 4.995, and required hits are 5.0, the message's headers should show:

-Scores are rounded to the nearest tenth as they are meant to be more informational in nature. This can be confusing as a message can get a score that looks like 5.0, yet still be non-spam with a threshold of 5. This is because the score is between 4.95 and 5.00. Scores in decimal are meant to be more of an informational thing rather than a filtering criteria, so there is no need to round down as with stars.
+{{{
+X-Spam-Level: ****
+X-Spam-Status: No, hits=4.9 required=5.0
+}}}

-== Can this be changed? ==
-
-The latter has been changed in SpamAssassin 3.0; now any score less then the threshold is also reported as being smaller though this might be mathmatically incorrect.
-
-The issue about the stars it ''could'' be changed, but in general we like it the way it is. It's a feature not a bug, so we're unlikely to fix it. However, it is relatively trivial to fix on your own if you must. The change is in {{{lib/Mail/SpamAssassin/PerMsgStatus.pm}}}.
-
-See also StatusRounding for an example.
+This rounding down of the spam hits (to the nearest 0.1) and of the stars (to the nearest integer) will hopefully be a more intuitive result.