SpamAssassin scores each incoming message against a set of known spam characteristics: suspicious links, forged headers, common spam phrases, and more. Messages that score above a threshold you set get flagged, and you can then have your mail account automatically move flagged mail to a separate folder or reject it outright.
In cPanel
- Log in to cPanel and open the Spam Filters tool.
- Toggle Process New Emails and Flag as Spam to on.
- Under Spam Threshold Score, set how strict the filter is. A lower number flags more mail as spam but risks catching legitimate messages; a higher number is more lenient. A score around 5 is a reasonable starting point.
- Turn on Auto-Delete Spam only once you're confident the threshold isn't catching real mail, otherwise flagged messages are simply marked so your mail client can filter them.
In DirectAdmin
- Log in to DirectAdmin and open Spam Filters (sometimes listed as SpamAssassin Settings) under the Email section.
- Enable spam filtering for the domain or specific mailbox.
- Set the spam score threshold in the same way, a lower number is stricter.
- Choose what happens to flagged mail: tag the subject line so you can filter it, or move it to a spam folder automatically.
SpamAssassin scores mail; it doesn't delete it by default. Pair it with a mail filter rule that moves or deletes messages once they're tagged, otherwise flagged spam still lands in your main inbox with just a marker in the subject line.
If you find genuine emails getting flagged, adding the sender's address to your account's whitelist is more reliable than raising the threshold, since a higher threshold lets more real spam through as well.