I have installed and configured and trained my spamassassin and all seemed to work just fine. Then when I tried to deploy it via spamc I get partial results.
Why is this happening?
I like spamc for the fact i can get it to output just the report but it seems to be missing checks: SPF, DKIM, BAYES.
I have not managed to figure it out or find any similar reports online. This has been going on for days now and I am out of ideas.
spamassassin works:
# spamassassin -t < /path/to/spam.eml
Content analysis details: (3.3 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60%
[score: 0.5000]
0.5 MISSING_MID Missing Message-Id: header
0.0 HELO_NO_DOMAIN Relay reports its domain incorrectly
1.4 MISSING_DATE Missing Date: header
spamc only partial:
# spamc -R < /path/to/spam.eml
Content analysis details: (1.5 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
0.1 MISSING_MID Missing Message-Id: header
0.0 HELO_NO_DOMAIN Relay reports its domain incorrectly
1.4 MISSING_DATE Missing Date: header
I figured the same problem.
The bayes databases are saved in the home directory of the user which runs spamassassin:
According to this wiki: http://wiki.apache.org/spamassassin/SiteWideBayesSetup , I added in /etc/mail/spamassassin/local.cf the following two lines:
and I created the needed directory: /var/spamassassin/bayes_db/
Please note that the last "bayes" in the path is the prefix for the database files (bayes_journal, bayes_seen, etc.)
Ok, after I restared the spamassassin, nothing happened. No Bayes test yet. Hmm...
So, I copied the already created databases from /root/.spamassassin/* to /var/spamassassin/bayes_db
Update: It seems that I had to change the permissions to these 4 bayes_* files to 0666. Otherwise the autolearner will not save the new data. I don't agree with 0666 permission, but I hope I will find another solution soon.
I ran another test in spamc and... I got the Bayes!! :)
Results for spamassassin
Results for spamc: