The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Block receiving emails from specific domain to any mailing list?

Discussion in 'E-mail Discussions' started by Eltawoos, Feb 19, 2015.

  1. Eltawoos

    Eltawoos Member

    Joined:
    Apr 19, 2014
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Dears,

    Is it any way to block receiving emails from specific domain to any mailing list on the server?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    765
    Likes Received:
    20
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I performed something similar two weeks ago.
    There are instructions out there, but the ones I found were not particularly idiot proof, so i wrote these for my own reference just in case I have to do it again.
    These instructions will allow you to stop any unwanted domains from emailing anything on your server.



    Creating an Exim Blacklist

    First create your blacklist.
    Inside the etc folder create a new file called “exim_blacklist”
    On a separate line, add the domains you wish to block. (one domain per line)
    This could be achieved by creating a standard text file on your computer, ftp it to the etc folder then remove the .txt extension.



    Go to WHM >> EXIM CONFIGURATION MANAGER >>

    Backup your current exim config before you start. Any errors in here could render EXIM useless.

    Did you make that backup ?.. No, then do it now.

    Next choose the Advanced Editor tab, and scroll down to the Add Additional Configuration Settings button. (about 1/3rd of the way down the page)

    Click the + sign to add another entry, and choose “domainlist [LISTNAME]” from the drop down.
    Over write [LISTNAME], with exim_blacklist and in the box opposite add: lsearch;/etc/exim_blacklist

    It should say: domainlist exim_blacklist = lsearch;/etc/exim_blacklist
    Click the green tick

    In the Routers Configuration section you add the following 6 lines:

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

    I added this to the “ROUTEREND” box.
    Click the green tick

    Save your config.
    Restart Exim.

    If you need to blacklist more domains, edit the exim_blacklist file.
     
    #3 keat63, Feb 19, 2015
    Last edited: Feb 19, 2015
  4. Eltawoos

    Eltawoos Member

    Joined:
    Apr 19, 2014
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

    Thanks a lot, but a asked about manage it on the "mailing list", (Big number of emails)
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page