cPanel uses Exim as its mail transfer agent (MTA). Proper Exim configuration is essential for reliable email delivery and preventing your server from being blacklisted.
Access Exim Configuration
WHM → Service Configuration → Exim Configuration Manager
Step 1 — Enable DKIM and SPF
WHM → Email → Enable DKIM/SPF globally:
# Via WHM command line
/usr/local/cpanel/bin/dkim_keys_install --all
/scripts/ensure_spf_records --all
Step 2 — Configure Smart Host Relay
If your server IP is blacklisted, route outbound email through a smart host:
# WHM → Exim Configuration Manager → Basic Editor
# Smart Host section:
Route all mail through a smarthost: YES
Smarthost: smtp.sendgrid.net (or your relay)
Port: 587
Step 3 — Tune Exim for Performance
# WHM → Exim Configuration Manager → Advanced Editor
# Add to main configuration section:
smtp_accept_max = 100
smtp_accept_max_per_host = 10
queue_run_max = 5
deliver_queue_load_max = 10
Step 4 — Fix Common Issues
# Check mail queue
exim -bp | head -20
# Force queue delivery
exim -qff
# Check specific message
exim -Mvh MESSAGE_ID
# Delete all frozen messages
exiqgrep -z -i | xargs exim -Mrm
Step 5 — Monitor Exim Logs
# Real-time log monitoring
tail -f /var/log/exim_mainlog
# Check for delivery failures
grep "failed" /var/log/exim_mainlog | tail -20
# Check rejected connections
grep "rejected" /var/log/exim_mainlog | tail -20
Step 6 — Configure RBL Checks
# WHM → Exim Configuration → RBLs
# Enable: zen.spamhaus.org
# Enable: bl.spamcop.net
Conclusion
Proper Exim configuration prevents blacklisting and improves delivery rates. Our team provides cPanel server management including full email configuration.
Comments