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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s