Spamassassin

Configure
After changing config in, don't forget tell SpamAssassin to reload config

Report Headers
SpamAssassin can had headers in the messages it scan. It will help you investigate things in case you get false-positive are false-negative.

Add the following lines to

Bayesian filter
To reach a good efficiency, SpamAssassin Bayesian filter need to be trained with both spam and ham messages. You can use your actual mailbox for that but note the following points:
 * Be sure that the folders you use for training contain only spam or ham. If a folder contain a mix of them, SpamAssassin will learn wrong info and produce bad quality results
 * To be effective you need between 1000 and 5000 messages each of both spam and ham.
 * You need to have more ham than spam to train. Otherwise, SpamAssassin might become biased toward spam.

To check the status of the database, you can run

Integrate with exim
Configuration is stored in.

Edit the following setting

By defauld sa-exim is disabled. Remove the following lines to enable it

You can now restart exim to take you settings into account

Integrate with dovecot
In file, modify the option mail_plugins and add antispam to the list

Edit file  and set or edit the following options