Imagine you are seeing a lot of Spam mails originating from a domain say abc.com in your server logs. We can blacklist the domain abc.com from sending mails through Exim mail server.
Create a file named /etc/eximblacklist and add the entry “abc.com” (without quotes). That is, add the domains you need to blacklist one per line.
Now go to WHM >> Exim configuration editor >> Advanced Editor.
Add the below lines in the first section just below the line “#!!# cPanel Exim 4 Config”
domainlist exim_blacklist = lsearch;/etc/eximblacklist
Now add inside the section under “ROUTERS CONFIGURATION ”
driver = redirect
# RBL Blacklist incoming hosts
domains = +exim_blacklist
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.
Save the configuration and see the exim error log. You can see the domain blocked.