Collapse

Announcement

Collapse
No announcement yet.

How to Block particular E-mail by Domain on a cPanel Server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Block particular E-mail by Domain on a cPanel Server

    Hi,

    Now, you can easily block a domain from being able to send or receive email. Here are the steps:

    touch /etc/blockeddomains
    echo "mydomain.com" >> /etc/myblockeddomains
    After you do the above, now log into WHM >> Service Configuration >> Exim Configuration Editor >> Advanced Editor. On this page, in the topmost box just add the following:

    domainlist blocked_domains = lsearch;/etc/myblockeddomains
    In the "ROUTER CONFIGURATION" section, look for the below lines in it.

    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
    After those lines just add below 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 this is one and above lines are added, save the configuration and you are done with it.

Working...
X