Pages

Friday, October 4, 2013

Figure out how to block a spammer domain server wide on a cPanel server.



Add /etc/antivirus.exim and restart exim
----------------------------
if $header_from: contains "@domain.com"
then
fail text "This message has been rejected since your domain or \n\ you are a filthy spammer."
seen finish
endif


=====================================================================

Create a file named /etc/eximblacklist and add the entry "domainname.com" (without quotes). That is, add the domains you need to blacklist.

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 "

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.

0 comments:

Post a Comment