Receiving spam, unsolicited sales emails, and phishing attempts wastes time and clutters your business inbox. Protecting your email accounts requires a combination of automated server-side filtering, proper DNS authentication records (SPF, DKIM, DMARC), and customized spam rules.
On Cubes Hosting, SpamAssassin is enabled by default for all Web & Email hosting accounts to filter incoming junk mail automatically.
This guide covers configuring SpamAssassin in DirectAdmin, setting up essential DNS authentication, and implementing spam filtering best practices.
1. Configuring SpamAssassin in DirectAdmin
SpamAssassin analyzes every incoming email and assigns it a Spam Score based on body text, header format, sender reputation, and embedded links.
How to Customize SpamAssassin Settings:
- Log in to your Cubes Hosting DirectAdmin Control Panel.
- Under E-Mail Manager, click SpamAssassin Setup.
- Customize your filter options:
- Where to Send Spam:
- Send to Spam Folder (Recommended): Moves high-score emails to your
/Spamfolder where you can review them. - Delete Spam Automatically: Instantly deletes emails exceeding your high-score threshold (e.g. score 10.0+).
- Change Subject: Adds
***SPAM***to the subject line while leaving the email in your main inbox.
- Send to Spam Folder (Recommended): Moves high-score emails to your
- Score Threshold:
- 5.0 (Default / Recommended): Balanced filtering for standard business email.
- 3.0 – 4.0 (Stricter): Blocks more aggressive marketing mail (may flag occasional legitimate mail).
- 7.0 – 10.0 (Lenient): Only flags obvious bulk spam.
- Click Save.
2. Essential DNS Records: SPF, DKIM, and DMARC
To ensure your outgoing emails land in recipient inboxes (and don't get marked as spam by Gmail or Outlook), you must enable three core DNS authentication records:
A. SPF Record (Sender Policy Framework)
SPF tells receiving servers which IP addresses are authorized to send email on behalf of your domain.
- Default Record:(Cubes Hosting automatically generates your SPF record when your web hosting plan is created).
v=spf1 a mx ip4:YOUR_SERVER_IP ~all
B. DKIM (DomainKeys Identified Mail)
DKIM attaches an encrypted cryptographic signature to your outgoing emails to prove they were not tampered with in transit.
- Enable DKIM in DirectAdmin: Go to Account Manager > DNS Management and ensure the
x._domainkeyrecord is present, or click Enable DKIM.
C. DMARC (Domain-based Message Authentication)
DMARC instructs receiving mail servers (like Google and Yahoo) on how to handle emails that fail SPF or DKIM checks.
- Recommended DMARC TXT Record:
Host: _dmarc.yourdomain.com Value: v=DMARC1; p=quarantine; rua=mailto:[email protected]
3. Whitelisting and Blacklisting Email Senders
If legitimate emails from a vendor are landing in your spam folder, or if a persistent spammer bypasses filters:
- In DirectAdmin, open E-Mail Manager > SpamAssassin Setup.
- Scroll down to Blacklist & Whitelist Settings:
- Whitelist Email / Domain: Enter
[email protected]or@trustedvendor.comto guarantee delivery. - Blacklist Email / Domain: Enter
[email protected]or@spamdomain.xyzto block all mail from that domain.
- Whitelist Email / Domain: Enter
- Click Save.
4. Best Practices for Spam-Free Mailboxes
- Avoid Catch-All Accounts: Never configure a Catch-All email address (
*@yourdomain.com). Catch-all accounts accept all misaddressed email sent to your domain, making them magnet targets for automated spam bots. - Use Individual Mailboxes: Create separate mailboxes for different departments (e.g.
[email protected],[email protected]). - Do Not Reply to Spam: Replying to spam emails or clicking "Unsubscribe" inside suspicious phishing emails confirms to spammers that your email address is active.
Conclusion
With SpamAssassin enabled by default, Cubes Hosting keeps your mailboxes protected out of the box. Tune your SpamAssassin score threshold in DirectAdmin, verify your SPF and DKIM records, and enjoy a clean, professional inbox!
