cpanel:exim:block-email-by-domain
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | cpanel:exim:block-email-by-domain [2016-03-23 11:47:37] (current) – created rory.blanchard | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== How to Block E-mail by Domain in cPanel ====== | ||
| + | To block a domain from being able to send or receive mail, use the following steps. | ||
| + | |||
| + | Log into SSH and run the following commands: | ||
| + | |||
| + | <note tip> | ||
| + | Make sure to replace example.com with the domain that you want to block | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | touch / | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | Log into **WHM**, then go to Service Configuration > Exim Configuration Editor > Advanced Editor. In the topmostbox add the following: | ||
| + | |||
| + | < | ||
| + | domainlist blocked_domains = lsearch;/ | ||
| + | </ | ||
| + | |||
| + | In the **ROUTER CONFIGURATION** section after the following lines: | ||
| + | |||
| + | < | ||
| + | democheck: | ||
| + | driver = redirect | ||
| + | require_files = " | ||
| + | condition = "${if eq {${lookup {$originator_uid} lsearch {/ | ||
| + | allow_fail | ||
| + | data = :fail: demo accounts are not permitted to relay email | ||
| + | </ | ||
| + | |||
| + | Add 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 blocked. | ||
| + | </ | ||
| + | |||
| + | Once you have added the lines, hit **Save** at the bottom. | ||
| + | \\ | ||
| + | \\ | ||
| + | \\ | ||
cpanel/exim/block-email-by-domain.txt · Last modified: by rory.blanchard
