Block account from sending mail WHM/cPanel

First, ssh into your server and add the domain name to a new file called /etc/blockeddomains

echo “” > /etc/blockeddomains

Next, set the right ownership/permissions:

chown root.mail /etc/blockeddomains && chmod 640 /etc/blockeddomains

ext, load up a web browser, log into WHM and go to:
WHM –> Service Configuration –> EXIM Configuration Manager –> Advanced Editor

Scroll down within that box about 1/4 of the way, and you’ll see something similar to:

Click on “Add additional configuration setting” and fill it out :

domainlist blocked_domains = lsearch;/etc/blockeddomains

Next, search for the string “ROUTERSTART”:

Add the following into it:


driver = redirect
domains = +blocked_domains
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

cPanel Plugins Installation

Generate an Installation File

 – For cPanel & WHM version 11.38 and earlier, you can generate an installation file with the Install File Generator form.

– For cPanel & WHM version 11.40 and later, you can generate an installation file with the cPanel Plugin Generator interface in WHM.

To Install the Plugin

  1. Copy the install file to your server. We strongly suggest that you copy the file to the /usr/local/cpanel/bin/ directory.
  2. Run /usr/local/cpanel/bin/register_cpanelplugin FULL_PATH_TO_INSTALLATION_FILE

 to Uninstall Plugins

/usr/local/cpanel/bin/unregister_cpanelplugin FULL_PATH_TO_INSTALLATION_FILE