How to block a spammer domain in exim configuration on cPanel Server? Print

  • 0

If you notice one of the domains in your WHM installed server is doing some email spamming activities and you need to block his emails without suspending the account, you can follow these steps in your default Exim configuration.

  1. Login to the server as root.

  2. Create a new file:

    # vi /etc/eximblacklist

    You can add the problematic domain inside this file without quotes. Save the file after adding the domain(s).

  3. Then we need to make some edits with the main Exim configuration file.

    # vi /etc/exim.conf

  4. Add the following line in the first session just below the line 'cPanel Exim 4 Config'

    domainlist exim_blacklist = lsearch;/etc/eximblacklist

  5. After that, add the following under 'Routers Configuration' section:
    reject_domains:
    driver = redirect
    # RBL Blacklist incoming hosts
    domains = +exim_blacklist
    allow_fail
    data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.
  6. Save the file and then restart the Exim service:

    # service exim restart


    If you are finding more domains doing the spamming activities, you can simply add the domain name to '/etc/eximblacklist' and no further changes needed.

Was this answer helpful?

« Back

Powered by WHMCompleteSolution