Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Block All Mail from hosting provider?

Discussion in 'E-mail Discussion' started by Bashed, Apr 9, 2019.

  1. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Nothing but spam, phishing emails from OVH.net.

    How do I block ALL incoming mail originated from OVH IPs? Can it be done in Spam Expert, Spam Assassin or even CSF?
     
  2. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    For a CPANEL domain only, create a global filter in Cpanel

    For a whole server, the easiest solution would be to install CSF Mailscanner, but it's not free.
    Or modify exim and create an exim_blacklist (search exim_blacklist, there are lots of threads covering this)

    Alternatively, you could add the range of IP's to CSF.

    https://bgp.he.net/AS16276#_prefixes

    Although this could be risky, from what I can make out, OVH are an ISP, so you may also block web traffic.
     
    #2 keat63, Apr 10, 2019
    Last edited: Apr 10, 2019
  3. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    So something like "any header" containts "ovh.net"?
     
  4. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    I guess any combination of:

    headers contains, from contains or from ends with would do what you want.

    I guess just be mindful that zzovh.net (made up TLD), contains ovh.net, so it has potential still to trip you up, albiet a low risk though.
    Could you use a wildcard ?
    Eg: If FROM contains *.ovh.net"
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Bashed,

    I recommend filtering the "FROM" field instead of "Any Header". Using "Any Header" could result in your server blocking emails from other servers that happen to have that domain in the email header. The following document offers some filtering tips:

    How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice