How to test email spam scores with amavis?
- by CaptSaltyJack
I'd like a way to test a spam message to see its spam scores that SpamAssassin gives it. The SA db files (bayes_toks, etc) reside in /var/lib/amavis/.spamassassin. I've been testing emails by doing this:
sudo su amavis -c 'spamassassin -t msgfile'
Though this yields some strange results, such as:
Content analysis details: (3.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
[score: 1.0000]
-0.0 NO_RELAYS Informational: message was not relayed via SMTP
0.0 LONG_TERM_PRICE BODY: LONG_TERM_PRICE
0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
[score: 1.0000]
-0.0 NO_RECEIVED Informational: message has no Received headers
0.2 is an awfully low scores for BAYES_999! But this is the first time I've used amavis, previously I've always just used spamassassin directly as a content filter in postfix, but apparently running amavis/spamassassin is more efficient.
So, with amavis in the picture, how can I run a test on a message to see its spam score breakdown?
Another email I ran a test on got this result:
2.0 BAYES_80 BODY: Bayes spam probability is 80 to 95%
[score: 0.8487]
Doesn't make sense, that BAYES_80 can yield a higher score than BAYES_999. Help!