المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How Do I Block One Domain From Sending Email From My Server?



Rise Company
05-11-2014, 20:37
You can try the following steps. First, in root SSH, run these commands:


touch /etc/blockeddomains
echo "domain.com" >> /etc/blockeddomains

Please replace domain.com with the domain name. Do not replace the "" part as that's required, only the domain.com part with the right domain name.

In WHM > Exim Configuration Editor > Advanced Editor, put the following in the topmost box:





domainlist blocked_domains = lsearch;/etc/blockeddomains

Locate the "ROUTERS CONFIGURATION" section, and right below these lines:



democheck:
driver = redirect
require_files = "+/etc/demouids"
condition = "${if eq {${lookup {$originator_uid} lsearch {/etc/demouids} {$value}}}{}{false}{true}}"
allow_fail
data = :fail: demo accounts are not permitted to relay email




Put the following lines:


reject_domains:

driver = redirect
# RBL Blacklist incoming hosts
domains = blocked_domains
allow_fail
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.


http://forums.cpanel.net/f43/how-do-i-block-one-domain-sending-email-my-server-223731.html#post920912

Rise Company
05-11-2014, 20:38
Wow, talk about a fast response! It seems to be working so far. If I go to re-enable the banned domain is it recommended that I remove all of the things I just added? Or just remove it from the /etc/blockeddomains? Thanks very much.

You can simply clean the file and let it be there -


echo > /etc/blockeddomains