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.

restrict users mail relaying

Discussion in 'E-mail Discussions' started by kernow, Apr 9, 2006.

  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    We have limited the amount of mails users can send out per hour from their domain name, but this doesn't stop them relaying mail using their user_name@our-server_name.com. We have a couple of users who now relay thousands of mails per hour, so how to restrict them? these mails are all in a foreign language so no telling if their spam or not.
    Would removing webmail from these two users stop them relaying ? a bit drastic i guess but is there another way to limit the amount they send out this way?
     
    #1 kernow, Apr 9, 2006
    Last edited: Apr 9, 2006
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It would, yes. But if you set it low enough you can then tell those that are using your domain to stop it and relay using their own domain.
     
  4. maximus_marcus

    maximus_marcus Well-Known Member

    Joined:
    Mar 9, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hello ,

    To achieve this , create the file /var/cpanel/maxemails and then place the domain name within the file and then enter the limit for the domain . For example enter like this in the given file

    #################

    domaintest.com=100

    ################

    This will allow the domain to send out only 100 mails per hour . Let me know if you need any further help with this .
     
  5. maximus_marcus

    maximus_marcus Well-Known Member

    Joined:
    Mar 9, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hello ,

    To achieve this , create the file /var/cpanel/maxemails and then place the domain name within the file and then enter the limit for the domain . For example enter like this in the given file

    #################

    domaintest.com=100

    ################

    This will allow the domain to send out only 100 mails per hour . Let me know if you need any further help with this .
     
  6. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thanks for the sugestion chirpy, but wouldn't that affect all clients who relayed mail?
    Lets say i add our_server.com as a domain and set the limit to 100 per hour, but then fred@our_server.com sends out 50 then joe@our_server.com sends another 50 in the same hour, so harry@our_server.com ( and any other user ) now can't relay any because the total has been reached ??
     
  7. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    True enough yes. Will give it a go. Thanks !
     
  8. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Have a problem doing that because WHM says i can't create a domain name which is the same as the server name and ofcourse a dns entry exists bla bla.
    Also, /var/cpanel/maxemails does not exist !!
     
  9. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Got it! Thanks very much.
     
  10. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Actually, for my 2c worth, I do it the other way around. That is, my default system-wide limit on mails per hour is 250 or so, high enough not to affect the average user. Then, if a specific user requests it, eg for a mailing list, I can bump the number up using /var/cpanel/maxemails for that particular domain. Works like a treat; spammers get stopped in their tracks (in my case, it was a script that spammers had exploited, but it amounts to the same thing).

    I think this is a "best practice" - it makes it really hard for your server to be a source of spam, yet provides a way to workaround it for users who send out a lot of legitimate email.

    Also, if someone is hitting the limit for a few hours in a row, they're probably a spammer and it's worth considering some sort of auto-suspension of their account (or simply drop the maxemails limit down to 10 or 20 per hour).
     
Loading...

Share This Page