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!

WHM ¿Block mails from especific domain?

Discussion in 'E-mail Discussion' started by shenzy, Aug 28, 2009.

  1. shenzy

    shenzy Well-Known Member

    Apr 27, 2008
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    In the Exim config is posible "Drop connections from defined IP Blocks upon SMTP connection"..
    but.. ¿is posible block connections from defined domains?

    Example: block connection from "" ?
  2. Spiral

    Spiral BANNED

    Jun 24, 2005
    Likes Received:
    Trophy Points:
    Absolutely! There is a huge long list of ways to implement this.

    I could give you some general basics but to be able to do this for
    a much larger scale such as "countries" or increasing general spam protection
    so you can receive all good mail safely while filtering out all bad mail, the discussion is probably a little to technical and long winded to sit here and type all morning long to be thorough on the subject.

    I will however be glad to take a look around and help guide you on the best options for you and how to implement them if you want to contact me and chat about it a bit.

    In the meantime, if you have SpamAssassin or MailScanner setup, you can just simply block the domains or IP addresses directly from the configurations for each of those. Technically you can do the same for the default built in Exim mail server by itself but the setup for that is a little more complicated.

    You might even want to look at setting up your own RBL server or blacklist
    to quickly block out known bad connections. Very easy to implement.

    If you get a huge number of connections from any particular source and
    you don't want to deal with that source at all anymore, you could block
    the IP or CIDR range with an IPTABLES filter or indirectly from your firewall
    and just simply drop those TCP packets so your mail server does not have
    to waste time answering those connections anymore.

    Anyway, there a lot of options available to you for that. ;)

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