In short
A secure cPanel server protects email in five layers: domain authentication (SPF, DKIM and DMARC), inbound filtering, account access (passwords, cPHulk and TLS), sending controls (Exim limits) and monitoring (logs, queues and reputation). Almost every incident starts with a phishing email that steals a password, so inbound filtering and sending controls are the two layers that prevent the most trouble.
The five layers of email security
No single tool secures email on its own. Each layer covers a different risk, and a gap in any of them ends the same way: outbound spam, the server IP on blocklists, and customers with bounced mail.
| Layer | What it prevents | Where it's configured |
|---|---|---|
| Domain authentication | Others sending mail as your domain, and your mail landing in spam | cPanel › Email › Email Deliverability |
| Inbound filtering | Phishing, BEC fraud, spam and malware reaching mailboxes | WHM › Exim Configuration Manager, SpamAssassin or a filter like Clisec |
| Account access | Passwords guessed by brute force | WHM › Security Center › cPHulk and the mail server settings |
| Sending controls | A compromised account sending thousands of messages | WHM › Server Configuration › Tweak Settings |
| Monitoring | Hearing about the problem from customers, days later | Exim and Dovecot logs, the mail queue and Postmaster Tools |
A 15-minute checklist
If you run a cPanel server and have never reviewed its email setup, start here. Each item links to the guide that covers it in detail.
- Hostname and PTR. The server hostname resolves to its IP and the IP has a PTR record with that same name. Details in PTR, A and MX records.
- Valid SPF, DKIM and DMARC on every domain: check cPanel › Email › Email Deliverability or, for all domains at once, the same tool in WHM. Guide: set up SPF, DKIM and DMARC.
- cPHulk enabled in WHM › Security Center › cPHulk Brute Force Protection, with your own IP on the allow list.
- Plaintext authentication disabled in WHM › Service Configuration › Mailserver Configuration (Allow Plaintext Authentication: No).
- An hourly sending limit set in WHM › Server Configuration › Tweak Settings (Max hourly emails per domain).
- SpamAssassin enabled and, if you host business customers, a filter that catches targeted phishing.
- IP off blocklists: check it at check.spamhaus.org. If it's listed, follow this guide.
- A normal mail queue:
exim -bpcshould show a few dozen messages, not thousands.
Layer 1: filter inbound email
Inbound filtering decides what reaches the mailboxes. cPanel ships several tools worth enabling before you consider anything else:
- Blocklists (RBLs) in Exim. Under WHM › Service Configuration › Exim Configuration Manager › Basic Editor › ACL Options you can reject connections from IPs listed on Spamhaus ZEN or SpamCop. Note that free use of Spamhaus over public DNS has volume limits; a busy hosting provider needs their Data Query Service (DQS).
- Reject SPF failures. In the same section, this option rejects mail from domains whose SPF record explicitly says the sending server isn't allowed.
- Greylisting. WHM › Email › Greylisting delays the first delivery from unknown senders. It stops a lot of bots, but adds minutes of delay to new legitimate senders.
- SpamAssassin. It scores each message and flags it as spam above a threshold. How to tune it: configure SpamAssassin in cPanel.
These tools are built for bulk spam. Targeted phishing and BEC fraud arrive in a handful of well-written messages from domains with no bad reputation, so they almost always get through. We explain why in why SpamAssassin misses targeted phishing.
Layer 2: protect account access
An attacker who guesses a mailbox password can read that person's mail, create forwarding rules and use the account to send spam from your server. The basic defenses:
- cPHulk blocks IPs and usernames with too many failed logins on cPanel, webmail, IMAP, POP3 and SMTP.
- Mandatory strong passwords in WHM › Security Center › Password Strength Configuration. A value of 70 or higher rules out the most common passwords.
- Encrypted connections only: disable plaintext authentication so nobody sends a password without TLS over ports 110 or 143.
- Two-factor authentication for cPanel and WHM in WHM › Security Center › Two-Factor Authentication. It doesn't cover IMAP or SMTP, but it protects panel access.
Modern attacks try a few passwords against many accounts at once, precisely to avoid lockouts. How to spot them: brute force and password spraying against email.
Layer 3: control outbound sending
No access control is perfect, so the server has to limit the damage when an account falls. In WHM › Server Configuration › Tweak Settings, Mail tab:
| Setting | What it does | Starting value |
|---|---|---|
| Max hourly emails per domain | Caps the messages each domain can send per hour | 200 to 500 on shared hosting |
| Maximum percentage of failed or deferred messages a domain may send per hour | Stops a domain with too many bounces, typical of a bought list or spam | 25% |
| Prevent "nobody" from sending mail | Stops PHP scripts from sending as the web server user | On |
| Track email origin via X-Source email headers | Adds headers showing which script or account sent the message | On |
Also enable WHM › Security Center › SMTP Restrictions, so only Exim and authorized users can open connections to port 25. That way a malicious script can't bypass the limits by talking straight to other servers.
If you have an active problem right now, follow compromised email account: how to find it and stop the spam.
Layer 4: authenticate your domains
SPF, DKIM and DMARC tell Gmail, Outlook and everyone else which servers may send mail for each domain. Without them, your customers' mail ends up in spam and anyone can spoof their domains. Gmail and Yahoo have required these records from bulk senders since 2024, and Microsoft since 2025.
cPanel's Email Deliverability tool checks and repairs SPF and DKIM in one click when DNS is hosted on the same server. DMARC has to be added by hand. Step by step in set up SPF, DKIM and DMARC in cPanel and, if mail is already landing in spam, in why are my emails going to spam.
Layer 5: monitor
Most email incidents are spotted late, when a customer complains. A few commands and tools surface them in minutes:
# Messages in the queue (normal: a few dozen)
exim -bpc
# Accounts that sent the most mail today (SMTP-authenticated)
grep "A=dovecot_login" /var/log/exim_mainlog | grep -o "A=dovecot_login:[^ ]*" | sort | uniq -c | sort -rn | head
# IPs with the most failed IMAP/POP3 logins
grep "auth failed" /var/log/maillog | grep -o "rip=[0-9a-f.:]*" | sort | uniq -c | sort -rn | head- WHM › Email › Mail Queue Manager and View Sent Summary show the queue and who is sending the most.
- cPanel › Email › Track Delivery follows a single message and shows why it bounced.
- [Google Postmaster Tools](https://postmaster.google.com) and Microsoft SNDS show how Gmail and Outlook rate your domains and IPs.
Legal duties in the EU and Chile
A compromised mailbox usually exposes personal data: customer emails, documents and passwords. That can trigger legal notification duties. A short overview, not legal advice:
| Law | Where | What it requires |
|---|---|---|
| GDPR, Article 33 | European Union | Notify the supervisory authority within 72 hours of becoming aware of a personal data breach that poses a risk to people. |
| NIS2 Directive | European Union | Covered data centre, cloud and other digital service providers must send an early warning within 24 hours and a notification within 72 hours of a significant incident. |
| Law 21.663, Cybersecurity Framework | Chile | Created the National Cybersecurity Agency (ANCI). Organizations designated as essential services or operators of vital importance must report incidents to the national CSIRT. |
| Law 21.719, personal data protection | Chile | Fully in force from December 2026; requires reporting security breaches to the new Personal Data Protection Agency. |
In practice, that means keeping mail logs long enough, having a written procedure for compromised accounts, and being able to show what filtering and controls were in place.
Frequently asked questions
What should I check first on a new cPanel server?
The hostname and its PTR, the SPF and DKIM records in Email Deliverability, that cPHulk is on, and that Tweak Settings has an hourly sending limit. That prevents most delivery and outbound spam problems.
Is SpamAssassin enough to protect email?
For bulk spam on small servers, it can be. It isn't designed for targeted phishing or BEC fraud, the attacks that do the most damage to businesses.
Do I need to change MX records to filter email?
With cloud gateways, yes. cPanel's own tools and Clisec filter on the server itself, without touching any domain's MX records.
How often should I review email security?
The quick checklist, once a month. The mail queue and failed logins, ideally with a daily automatic alert.
Protect inbound email on your whole server
Clisec filters inbound email for every account on your cPanel server and catches the phishing that steals passwords, with no MX changes.