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.

Overriding "Max hourly emails per domain"

Discussion in 'E-mail Discussions' started by Netcrusher, Jan 27, 2014.

  1. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    I have a overall e-mail sending limit set to 100 e-mails per domain.
    I have one account where I want to set a hourly limit of 300 e-mails.

    I tried editing the value of MAX_EMAIL_PER_HOUR-$domain=300 in /var/cpanel/users/$account but without success.
    After editing that value, I did run /usr/local/cpanel/scripts/updateuserdomains.

    The e-mails are sent from PHP using mail() function.

    What's the correct way of overriding the value from Tweak Settings?

    Thank you very much!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    While it's essentially the same thing as manually editing the cPanel user file, I suggest modifying the maximum hourly email limit via WHM to ensure it's setup correctly:

    "WHM Home » Account Functions » Modify an Account"

    This takes precedence over the default limit for accounts. Also, you mentioned using a PHP script to send out email. What PHP handler is in use? Are you able to configure it to use SMTP authentication instead?

    Thank you.
     
  3. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I already tried editing the account's package before editing the account file. It didn't work.
    In both cases, the limit remained at 100 emails.

    I'm using DSO PHP5 with suEXEC and Ruid2.

    The site is a vBulletin forum.
    So, I can configure an account for sending, but mail() is prefered.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Email sent through the PHP mail() function are not bound by the "Max hourly emails per domain" limit. You will need to force your script to use SMTP authentication when sending out emails to ensure it's included in the limit.

    Thank you.
     
  5. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    So there is no way to override the global settings for the mail() function?
    The overridden values work only for e-mail accounts?

    So, if a set a different maximum e-mails in the package, it will affect the e-mails sent through accounts?

    Thanks for the replies!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, for email sent with SMTP authentication. It's not possible to implement this restriction when sending mail using the PHP mail() function. It's recommended that you alter your script configuration so it sends out email with SMTP authentication to ensure such a limit is enforced.

    Thank you.
     
  7. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    The master limit works for mail(), it just isn't overridden.
    I'll try the package limit sending with SMTP authentication...

    Thanks!
     
  8. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I modified the package, set the limit to 300 e-mails.
    I changed the way e-mails are sent, now the site is using SMTP auth...

    The limit is still 100!

    So, no matter what other limit I set, the default setting is never overridden...

    Any solutions?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  10. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I can't allow you to access the server, so the ticket is pointless...
    I was wondering if I'm doing something wrong...

    Modifying the package is equivalent to editing the account individually, right?
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Check the cPanel user file to see if the limit is added. EX:

    Code:
    /var/cpanel/users/$username
    You should see an entry like this:

    Code:
    MAX_EMAIL_PER_HOUR=100
    Thank you.
     
  12. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I checked:
    MAX_EMAIL_PER_HOUR=300

    I'm receiving e-mails notifying that more than 100 e-mails are trying to be sent...
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you check if there is an entry for the domain name in the /etc/email_send_limits file? An entry for the domain name should exist, as documented here:

    Mail Delimiter
    Mail Limiting Features

    If the entry already exists in this file, then we will need access to your system through our help desk in order to investigate the issue further because it's not the expected behavior.

    Thank you.
     
  14. Netcrusher

    Netcrusher Active Member

    Joined:
    Mar 8, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    The entry exists:

    root@<server> [/]# cat /etc/email_send_limits | grep <domain>
    <domain>: 300,unlimited,5
     
  15. Sreejit

    Sreejit Member

    Joined:
    Apr 11, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I will suggest you to take a look at this plugin from configserver. You can setup hourly email limit per domain.
    ConfigServer Mail Manage
     
Loading...

Share This Page