How to Enable Outgoing Spam Filtering Using SpamAssassin

So a lot of people get their server hacked and then have malware sending out a boat load of spam, or your computer gets infected with a virus and your computer happens to have Outlook with your email on it, or you have forwarded setup and they just happen to be forwarding all of the spam you are getting in your inbox. All of these scenarios happen and they will either hurt your email reputation or land you on a blacklist. This guide is to help limit that. By enabling SpamAssassin to filter outgoing emails for spam it should limit this issue, and hopefully make it so you don’t have to worry about emails getting bounced.

So first you you will need to log into the WHM. Click this link if you do not know how to do that.

Once you are in the WHM you can go to the search bar in the top left and type Exim and then choose the Exim Configuration Manager option.

exim-configuration-manager

Once you are on the Exim Configuration Manager page you will stay on the Basic Editor, then you will select the SpamAssassin Options. If you do not see it then there will be a little blue arrow pointing to the right to let you scroll to see the other options. The last one being SpamAssassin Options.

spamassassin-options

So before we get to enabling SpamAssassin I need to explain how SpamAssassin works. This applies to both incoming and outgoing filtering. SpamAssassin is a content filter, it gives emails a score based on how much spam they have in the the email. The higher the score means there is more spam content in the message. So if you want to make sure that no spam comes in or leaves your server then you will want to make the number low. If you want to filter just the most outrageous spam but want to make sure everything gets sent and delivered then you would want a higher number. I like to use 3, I find it filters most spam, but I still get all of the emails that I need. The server defaults at 5.

Now there are two different options the first one: “Scan outgoing messages for spam and reject based on SpamAssassin® internal spam_score setting” means that it will block spam based on the setting that you have already set, or it will use the default. The other option is: “Scan outgoing messages for spam and reject based on defined SpamAssassin® score (Minimum: 0.1; Maximum: 99.9)”, this is nice because you can be more strict with the outgoing mail, and make all account have the same setting. I suggest this one, it gives you, the server admin 🙂 a little more control.

spamassassin-settings

Once you have decided which setting you want to enable and which score you want SpamAssassin to filter, then just go ahead and click save. You’ll get a message stating:

Your configuration changes have been saved!
Exim MTA...
Waiting for exim to restart.................finished.

exim (/usr/sbin/exim -bd -q60m) running as mailnull with PID 3413 (pidfile check method)

exim started ok
...Done

Congratulations you now have SpamAssassin filtering your outgoing mail!!!

Posted in Archived Posts and tagged .