Block One Domain From Sending Email From Server

You can try the following steps. First, in root SSH, run these commands:

Code:
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:

Code:
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:

Code:
reject_domains:

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: