The single most effective guard against a compromised account spamming from your server — and against a legitimate account accidentally blasting a list that gets your IP blocklisted — is a sensible hourly outbound limit. cPanel sets a server-wide Max Emails Per Hour cap in Tweak Settings and lets you override it per account, plus a percent-deferred threshold that detects an account suddenly spewing undeliverable mail. This runbook covers configuring those limits so one account cannot flood outbound, while leaving room for the accounts that legitimately send more.
What’s happening
Every authenticated account on the server can hand mail to Exim for outbound delivery. Without a cap, a single compromised mailbox or a runaway script can push tens of thousands of messages through your IP in minutes — long enough to get the IP onto every reputation list before you notice. cPanel’s Max hourly emails per domain (Tweak Settings) sets a ceiling: once an account’s domain exceeds that many messages in a rolling hour, further messages are deferred or failed and logged, capping the damage. A complementary setting, Max percentage of failed or deferred messages a domain may send per hour, catches the shape of a spam run — a flood of mail to nonexistent recipients shows up as a spike in deferrals even before the raw count cap trips.
These are blunt by design, and the goal is to set them low enough to contain abuse but high enough not to break legitimate senders. A typical small-business mailbox sends well under a hundred messages an hour; a newsletter account or a transactional app sends far more. That is why cPanel allows a per-account override: the server default protects everyone, and you raise the limit only for the specific accounts that genuinely need it. Setting one global number high enough for your busiest sender would leave every other account dangerously unconstrained — the override is what lets you keep the default tight.
How to verify
See the current server-wide limits.
# Server default hourly cap and deferred-percentage threshold
whmapi1 get_tweaksetting key=maxemailsperhour
whmapi1 get_tweaksetting key=emailsperdaynotify 2>/dev/null
grep -i 'max_email\|maxemails\|deferfail' /var/cpanel/cpanel.config
Check whether a specific account has an override and what it sends:
# Per-account override (if set)
grep -i 'MAX_EMAIL_PER_HOUR\|MAXEMAILS' /var/cpanel/users/<cpaneluser> 2>/dev/null
# How much is this account actually sending this hour?
grep "$(date '+%Y-%m-%d %H')" /var/log/exim_mainlog | grep '<= ' | grep -c '<cpaneluser>'
Confirm the cap is firing when an account exceeds it:
# Limit-exceeded events in the log
grep -i 'ratelimit\|too many\|exceeded the max\|hourly' /var/log/exim_mainlog | tail -20
The fix
-
Set a tight server-wide default in Tweak Settings — go to WHM » Server Configuration » Tweak Settings » Mail and set Max hourly emails per domain to a value that covers normal accounts with margin but contains a flood — not unlimited. This is the baseline that protects every account that has no override.
-
Enable the percent-deferred threshold — in the same Tweak Settings Mail section, set The percentage of email messages (above the account’s hourly maximum) a domain can fail or defer before its outgoing mail is blocked. This catches a spam run that is mostly bouncing (bad-recipient lists) even when the raw volume is under the count cap.
-
Override the limit per account for legitimate high-volume senders — for a newsletter or transactional account that genuinely needs to send more, raise its cap individually in WHM » Modify an Account (the Max emails per hour field for that account) or the account’s email-limit setting. Keep the server default low and lift only the accounts that need it.
-
Notify on approach, not just on block — configure cPanel to alert when an account nears or hits its limit so you learn about a compromise or a misbehaving script promptly, rather than discovering it only when the IP is already listed. The contact-manager / notifications settings control these alerts.
-
Treat a limit hit as a possible compromise — when the log shows an account exceeding its cap unexpectedly, do not just raise the limit. Check whether the account is sending spam (queue inspection,
cwd=of the sending process); if compromised, suspend and clean it before adjusting anything. -
Coordinate with rate throttling and per-account IPs — the hourly cap limits volume per hour; pair it with the finer-grained outbound rate throttle (messages per interval) for burst control, and route a high-volume sender to its own outbound IP so its reputation is isolated from the shared pool.
-
Document each override — keep a note of which accounts have raised limits and why, so an unexpectedly high cap is recognizable later and a stale override from a former campaign gets pruned rather than silently leaving an account wide open.
With a tight default, a working percent-deferred threshold, and overrides only where justified, a compromised or runaway account is contained within an hour’s worth of mail instead of flooding your IP into a blocklist. The limit is the cheapest insurance you have against outbound abuse — set it low and lift it deliberately. Stack Harbor configures cPanel outbound limits and abuse containment under managed cPanel operations — start a conversation.