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 “domain.com” > /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:

reject_domains:

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