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 particular domain

Discussion in 'E-mail Discussions' started by rodrigorlx, Oct 22, 2010.

  1. rodrigorlx

    rodrigorlx Registered

    Joined:
    Oct 22, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi all.
    I have about 10 sites in my server and some of them are being "attacked" by users registering and registering using disposable e-mail addresses.
    I wanna know how can I block a specific domain name from reciving e-mails from my server.

    I've browsered the web a lot before opening this topic but I was unable to find an answer. The best I've found is:

    Code:
    if $header_from: contains “@domain.com”
    then
    fail text “Error Message Here”
    seen finish
    endif”
    I tryed changing $header_from to $header_to but that doesn't work.

    Any idea how can I do that?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    198
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You want to block them from being able to register on a website? What software is the website running?
     
  3. rodrigorlx

    rodrigorlx Registered

    Joined:
    Oct 22, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    No,
    Users go and register fake accounts using services like www. spam.la (no link because this kind of service doesn't desire a link!) and I need to ban one by one.

    And as there are lots of sites in my server, I need to do it in all.


    The point is:
    All sites have a email confirmation system, so, blocking my server to send e-mails to @spam.la will have effect as the user won't be able to confirm the account! :)


    Got it?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    198
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yep, and what you're doing is not the best way to go.

    What software are the sites using? Many popular scripts these days offer spam prevention plugins of some sort. This, might be the best way to go. Mod Security might also be another tool to help here if these are bots registering to spam.
     
  5. rodrigorlx

    rodrigorlx Registered

    Joined:
    Oct 22, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Why it's not the best way?
    Each site uses a different script and none of them have this option.
    I found ModSecurity webpage. Is that a mod for WHM?

    There isn't any other way to block that domains?
     
  6. onef

    onef Member

    Joined:
    Mar 19, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I'm a bit confused, do these users have to email your server to register for membership on your site? Like, an email pipe into your registration script or something?

    If so, and you know you'll never receive legit mail from that domain, just add that domain as an addon domain. Then, whenever they email in, the server will see that a remote mail server is trying to use a local domain, and the mail should be blocked.

    If you're just talking about your cms/forum/whatever, there's most likely something you'll have to enable in there.
     
    #6 onef, Oct 24, 2010
    Last edited: Oct 24, 2010
Loading...

Share This Page