Skip to content

Configuring RBLs in Exim on cPanel without false positives

Which DNS blocklists to enable for inbound mail on a cPanel server, how to tier them so a single false positive does not block legitimate senders, and how to whitelist trusted ranges.

DNS blocklists (RBLs) catch about 80% of incoming spam at the SMTP layer with no need to scan content. The pitfall is that operators enable five lists, set each to outright reject, and then discover one list flagged a customer’s payment processor. The right approach tiers the lists by quality and stacks them: high-confidence lists reject outright, medium-confidence lists score into SpamAssassin, and you whitelist trusted ranges explicitly.

What’s happening

cPanel exposes RBL configuration through WHM > Exim Configuration Manager > RBLs tab. Each enabled RBL is queried via DNS during the SMTP transaction. A match returns the connecting IP wrapped in the list’s response code (127.0.0.x), and Exim either rejects with 5xx or adds a header for SpamAssassin to score. The default cPanel config enables Spamhaus Zen and SpamCop; both are reasonable choices, but the action (reject vs. add header) and the order matter.

How to verify

List the active RBL configuration:

grep -A20 "^acl_smtp_rcpt" /etc/exim.conf | head -40
exim -bP | grep -i rbl

Then test a specific RBL against a known IP:

dig +short A 1.2.3.4.zen.spamhaus.org
dig +short A 1.2.3.4.bl.spamcop.net

If the lookups return 127.0.0.x, the IP is on that list. Test against your own outbound IP to confirm you’re not surprised on inbound.

The fix

  1. Tier the lists by confidence. High-confidence: Spamhaus Zen, Barracuda BRBL. These you can reject on. Medium: SpamCop, SORBS. These should add a score header for SpamAssassin to combine. Low or specialized lists (UCEPROTECT levels 2–3, certain regional lists) should be off entirely.
  2. In WHM > Exim Configuration Manager > RBLs, configure each list with the right action. Spamhaus Zen and BRBL: reject. SpamCop: add header. Don’t enable URIBL at the Exim level — that’s a SpamAssassin job.
  3. Configure trusted_networks in SpamAssassin to skip RBL scoring for known good ranges (your office IP, your other servers, your monitoring providers). trusted_networks 192.0.2.0/24 in /etc/mail/spamassassin/local.cf.
  4. Whitelist specific senders that recurringly trip an RBL. cPanel’s per-user whitelisting works; for global, edit /etc/mail/spamassassin/local.cf with whitelist_from.
  5. Monitor RBL hit rates with a periodic grep of the Exim log. If one list rejects more than 2–3% of inbound, audit it — it’s either misconfigured or matching legitimate senders. A list that rejects 50% of mail is broken or too aggressive for your population.

When inbound spam volume is unstable and tuning needs to happen against current data, Stack Harbor maintains the RBL stack and the whitelist as part of cPanel/WHM management.