Greylisting temporarily rejects email from senders the server has not seen before. Legitimate mail servers retry after a few minutes and are accepted; many spam bots never retry. It is a cheap, effective spam filter, with the trade-off of delaying the first message from a new sender.
MdmHost manages mail server settings on its hosting plans. This guide is for administrators of their own cPanel server with root access.
Before you start
- Root access to WHM.
- A list of senders whose first messages must not be delayed, such as payment providers or ticket systems.
Enable greylisting
- Go to WHM → Email → Greylisting.
- Switch it On.
- Open Configure Settings.
Settings
| Setting | Suggested |
|---|---|
| Initial delay (minutes a sender must wait before retrying) | 5 |
| Time window to accept the retry | 4 hours or more |
| How long a successful sender is remembered | Several days or more |
| Automatically trust IPs listed in SPF records of trusted domains | On |
| Always greylist mail from IPs with no reverse DNS | Optional, catches many bots |
Trusted hosts and domains
- In Trusted Hosts, add IP ranges of important senders that do not retry well.
- In Trusted Domains (if available in your version), add domains such as major mail providers; their SPF IPs are trusted automatically.
- Common mail providers are on cPanel's built-in common mail providers list, which you can trust in one click.
Warning: Greylisting delays one-time codes and password-reset emails from new senders. Trust the services your customers rely on, or tell them that first messages from a new sender may arrive a few minutes late.
Check the effect
- Watch
/var/log/exim_mainlogfor "greylisted" deferrals. - Compare spam complaints and SpamAssassin scores before and after (see SpamAssassin).
Troubleshooting
A customer never receives mail from one sender
The sender's servers do not retry, or retry from changing IPs. Add their IP range to Trusted Hosts.
Mail delays are too long
Lower the initial delay, and make sure common mail providers are trusted.
Other mail server settings are covered in Mailserver Configuration and Exim configuration.
Frequently asked questions
Does greylisting stop all spam?
No. It stops many bots. Combine it with SpamAssassin, RBLs and SPF/DKIM checks.
Do users notice greylisting?
Only as an occasional delay on the very first message from a new sender.
Can individual users turn it off?
Greylisting is a server setting; individual domains can be trusted by the administrator.
Does greylisting affect outgoing mail?
No. It only applies to incoming mail from other servers.
How do I trust a sender quickly?
Add the sending server's IP or range to Trusted Hosts; the next delivery is accepted immediately.
Can greylisting cause lost mail?
Only if the sender never retries, which proper mail servers always do. Bulk senders with rotating IPs may be delayed longer; trust them.
Is it worth it with Imunify360?
Yes. Imunify360 protects the web side; greylisting reduces spam reaching mailboxes.
