How to Set Up Spam Filters in DirectAdmin
DirectAdmin includes SpamAssassin, one of the world's most widely used spam filtering systems. It automatically analyses incoming emails and helps block junk mail, phishing attempts and unwanted marketing emails before they reach your inbox.
What Can SpamAssassin Do?
Filter Junk Email
Automatically detect spam using thousands of spam detection rules.
Block Senders
Blacklist individual email addresses or entire domains.
Whitelist Contacts
Ensure trusted senders always reach your inbox.
Score Every Email
Each email receives a spam score allowing you to decide how aggressively spam should be filtered.
Step-by-Step Instructions
Step 1
Login to DirectAdmin.
Step 2
Open Email Manager.
Step 3
Select SpamAssassin Setup.
Step 4
Enable SpamAssassin and configure your preferred settings.
Step 5
Save your changes.
Recommended Spam Score
Score: 3-4
Very strict. Blocks more spam but may occasionally catch genuine emails.
Score: 5 (Recommended)
A good balance between blocking spam and allowing legitimate emails through.
Score: 7-10
Less strict. Fewer legitimate emails are blocked, but more spam may arrive.
Block Individual Email Addresses
If the same sender keeps emailing you unwanted messages, add their address to the blacklist.
Examples
spam@example.com offers@spamcompany.com newsletter@marketing.co.uk
Emails from these addresses will receive a very high spam score.
Block Entire Domains
If multiple spam emails come from the same company, block the whole domain.
Examples
@example.com @spam-domain.net @marketing-company.co.uk
Every email sent from these domains will be treated as spam.
Whitelist Trusted Senders
Whitelist important contacts so they are less likely to be marked as spam.
Examples
client@example.com accounts@supplier.co.uk @trustedcompany.com
How Spam Scores Work
0 - 2 Points
Almost certainly a legitimate email.
3 - 5 Points
May contain suspicious content but is often legitimate.
6 - 10 Points
Likely spam or phishing email.
10+ Points
Almost certainly spam and usually safe to quarantine or delete.
Typical Spam Indicators
Suspicious Subjects
FREE MONEY URGENT PAYMENT Congratulations! Crypto Investment You've Won!
Suspicious Senders
Unknown domains, spoofed addresses and compromised email accounts are commonly detected.
Missing Authentication
Emails failing SPF, DKIM or DMARC checks often receive higher spam scores.
Why Am I Still Receiving Spam?
New Spam Campaigns
Spam evolves constantly and new campaigns may not yet be fully recognised.
Spam Score Too High
Your spam threshold may not be strict enough.
Compromised Accounts
Hackers often send spam from legitimate email accounts, making detection harder.
Marketing Emails
Many newsletters are technically legitimate and may not be classified as spam.
Common Problems & Fixes
Good Emails Going to Spam
Increase your spam score slightly or whitelist the sender.
Too Much Spam
Lower the spam score and blacklist repeat offenders.
Spam Folder Full
Delete old spam regularly to prevent your mailbox quota filling up.
Receiving Phishing Emails
Never click links or open attachments from unexpected emails, even if they appear genuine.
Best Practices
Review Spam Folder
Check your spam folder regularly for incorrectly filtered messages.
Use SPF, DKIM & DMARC
Correct email authentication significantly improves spam detection.
Keep Mailboxes Clean
Delete old spam regularly to avoid using unnecessary mailbox storage.
Don't Delete Immediately
Move spam into a Spam folder first before automatically deleting messages.
Recommended Configuration
For most users we recommend enabling SpamAssassin with a spam score of 5, moving suspected spam into the Spam folder rather than deleting it, blacklisting persistent spam senders, and whitelisting trusted contacts. Combined with correctly configured SPF, DKIM and DMARC records, this provides excellent protection against junk mail while minimising false positives.