Admin-Ahead Community

General Category => General Discussion => Topic started by: joseletk on November 16, 2018, 02:02:35 am

Title: How to block a spammer domain server wide on a cPanel server.
Post by: joseletk on November 16, 2018, 02:02:35 am
Create a file named /etc/eximblacklist and add the entry "domainname.com" (without quotes). That is, add the domains you need to blacklist.

Next, we need to open the Exim configuration file /etc/exim.conf

Add the below lines in the first section just below the line "#!!# cPanel Exim 4 Config"

Code: [Select]
domainlist exim_blacklist = lsearch;/etc/eximblacklist
Now add inside the section under "ROUTERS CONFIGURATION"

Code: [Select]
reject_domains:

driver = redirect
# RBL Blacklist incoming hosts
domains = +exim_blacklist
allow_fail
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.

We can add more domain manually to reject more if domains sending spam.