Why don't the rule scores in the Mail Viewer add up?
You may have noticed that the scores that appear at the top of the Mail Viewer page don't always add up to the same score value you saw on the quarantine/cache list.
Take this e-mail for example, which scored 1.2 in the Unconfirmed Non-spam Cache:
Score Rule Triggered Explanation 1.351 HTML_10_20 Message is 10% to 20% HTML 1.000 AWL From: address is in the auto white-list 0.637 SARE_MSGID_LONG40 Message ID has suspicious length 0.001 DK_SIGNED Domain Keys: message has an unverified signature 0.001 HTML_MESSAGE HTML included in message -0.001 SPF_PASS SPF: sender matches SPF record -0.001 DK_VERIFIED Domain Keys: signature passes verification -0.185 BAYES_40 Bayesian spam probability is 40 to 44%
Adding up the score values you see in the Mail Viewer's report, you'd conclude that the mail should have scored 2.803, not the 1.2 that it did. Why is there a discrepancy?
There are a number of reasons this could happen:
- It's possible that Maia doesn't have an up-to-date list of the rules and scores that SpamAssassin is using. Whenever you make any changes to your SpamAssassin rules, such as by running sa-update, the RulesDuJour script, or by manually editing a *.cf file, you need to run the load-sa-rules.pl script. That script refreshes the list of rules and scores in Maia's database, so that it matches the ones SpamAssassin is using. If you forget to do this, the score values may not match the current values, and some newly-added rules may be overlooked entirely.
- The scores that appear in the quarantine/cache lists have been rounded to one decimal place, but in fact the scores are calculated internally to three decimal places. What you see as 1.2 on the quarantine/cache list may in fact have been something like 1.175 or 1.228. If you add up the rules in the Mail Viewer's report and you find a total that rounds up or down to the value shown on the quarantine/cache list, there's no reason for concern.
- Some rules provided by third parties such as the SARE rules are missing descriptions and don't get loaded into Maia's database. See #357.
UDPATE: The following items are no longer valid in version 1.0.2, as we can now calculate this score
- In the case of the AWL rule (i.e. SpamAssassin's Auto-Whitelist feature), the score will always show up as 1.000 in the Mail Viewer. That's because the score value of the AWL rule is dynamic--SpamAssassin assigns a different score each time the AWL rule is triggered, so there's no way for Maia to know what that value is for any given e-mail. The AWL rule is special--it's supposed to be scored according to the "reputation" of the sender, so that if the sender has a history of sending you spam, the AWL rule score should be higher, and if he has a history of sending you non-spam the score should be lower. In the example above, for instance, we could guess that the AWL rule actually scored somewhere around -0.603 (1.2 - 1.803), if all the rules and scores in Maia's database are current.
- Similarly, if you are using OCR to scan text, the score for that rule will always show up as 1.000 in the Mail Viewer, as it too, is dynamic. If a rule triggers both AWL and an OCR rule, then it is no longer possible to determine the actual score.