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.

Exim Blacklist -> *domain doesn't work

Discussion in 'E-mail Discussions' started by vagkaefer, Jun 22, 2015.

  1. vagkaefer

    vagkaefer Member

    Joined:
    Jun 25, 2014
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a manual filter in the exim. It was done this way:

    In section: "CONFIG". I put:

    domainlist exim_blacklist lsearch;/etc/eximblacklist

    In Section: "PREROUTERS". I put:

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

    So I put a host in each line of the file /etc/eximblacklist. Works perfectly, the emails are blocked.

    But sometimes i need to use a "wildcard". For example, I like to block all senders of the .tk domains.

    I thought I'd use: * .tk

    But it does not work, how do I use the "wildcard"?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You can try to create your custom filter in your /usr/local/cpanel/etc/exim/sysfilter/options/ directory and try to enable it through WHM->Exim Configuration Manager->Basic Editor->Filters

    Create /usr/local/cpanel/etc/exim/sysfilter/options/inbound_tld_block file and add following code

    Code:
    if first_delivery
    and ("$h_to:, $h_cc:" contains ".tld")
    or ("$h_from:" contains ".tld")
    then
    seen finish
    endif
    To disable the filter, you can set it to “Off” in the WHM->Exim Configuration Manager->Basic Editor->Filters : "** Custom Filter: inbound_tld_block"
     
    vagkaefer likes this.
  3. vagkaefer

    vagkaefer Member

    Joined:
    Jun 25, 2014
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Worked fine! Tks so much!
     
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    I am happy to see the issue is now resolved. Thank you for updating.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page