Ive just installed a fresh Buster/ISPConfig 3.1.14 and its all working but ive got a query about Spam Assassin. Ive turned out header tagging on mails and it would appear Bayes and autolearn does not appear to be used or on. An example header:- A few other spams show the same, no mention of Bayes or autolearn. Doing more checking for the Bayes DB itself:- The same with --username=amavis returns no output at all. The spamassassin conf file itself is entirely commented out so i assume its being parsed by ISPConfig in some other way. So what am i missing here? How do i get SA to start using Bayes and if needed, manually train it?
Just notice ive posted this in linux not ispconfig forum and cant seem to move it. Any chance a moderator can move this post to the correct place?
When you run spamassassin via sudo like that, it runs as the root user, which by default will use a bayes database owned by root - when mail is delivered via smtp, the spam scanning is done in the amavis daemon, as the amavis user, and it will use a different bayes database for that user. Neither sudo nor spamassassin accept a --username arg, so you should be getting an error there, then piping it to your egrep command which doesn't match anything, hence no output. There are many config files, though /etc/spamassassin/local.cf is the typical local configuration. If everything is commented, it's using either default settings, or settings configured in other files. You get a "working" spamassassin setup by following the Perfect Server install guides, but there is certainly a lot more local configuration you can do to improve it, see the various files under /etc/spamassassin/; eg. you need to enable some plugins in .pre files, some of which need a little configuration or setup, and there are many configuration settings you can and often should use (start with installing a local caching nameserver for spamassassin to use, and configuring trusted_networks). Search for general spamassassin info for more. To use bayes you must have trained the bayes database with a minimum of 200 spam and 200 ham messages. Do not just enable autolearning and let it learn what it will, or you will be in a bad way very soon, with bayes frequently fighting against you (classifying mail poorly). If you have a very well configured system, where all the non-bayes pieces are doing a very good/accurate job of classifying mail, autolearning can be useful; but just out of the box I think it usually does more harm than good, so setup a way to train it manually.