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.

Email per hour per domain - Need Help

Discussion in 'E-mail Discussions' started by impload, Nov 3, 2009.

  1. impload

    impload Member

    Joined:
    Nov 2, 2009
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I know we can set "maximum each domain can send out per hour (0 is unlimited)" in tweak setting but what im looking to do is have one domain have unlimited sending per hour and all the rest 500 per hour. How can this be done? :)

    thanks guys.
     
  2. thewebhostingdi

    thewebhostingdi Well-Known Member

    Joined:
    Jan 10, 2008
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    You can set the email sent limit to 500 from tweak settings for each domain. However, to set the unlimited email sent for the particular domian you can do it from the SSH. Below mentinoed are the steps to increase the email sent limit for the particular domian.

    pico /var/cpanel/maxemailsperdomain/yourdomainhere.com

    yourdomainhere.com is the domain for increasing the number of mails. Once you enter the no. as unlimited or 0 in the file. You may save it and REMEMBER to restart exim services by executing the following command :

    /scripts/build_maxemails_config

    Changes have been made. However, for monitoring purposes, you may execute the following command :

    tail /var/log/exim_mainlog

    Moreover, I suggest you to do not allowed unlimited email to send per hour as it may creates problems on the server.
     
  3. impload

    impload Member

    Joined:
    Nov 2, 2009
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks so much for your reply :)
    One last question, in the file I create, "pico /var/cpanel/maxemailsperdomain/yourdomainhere.com" all this file needs to be is a number? Like just create the file and enter in 0 and save it?
     
  4. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Via root SSH access, the following method may be used to setup a custom e-mail limit per hour for a domain name, overriding any global limit that may be setup.

    1.) For no limit or unlimited, use "0" -- or to define a limit, simply replace "0" with your desired numerical limit (of any number greater than zero).
    2.) Given a limit of "0" (i.e., unlimited), enter the following two commands (and replace "domain.tld" with the actual account domain involved):
    Code:
    # echo "domain.tld=0" >> /var/cpanel/maxemails
    # /scripts/build_maxemails_config
    Once the above setup is completed, a file named after the domain should exist, such as at the following path:
    Code:
    /var/cpanel/maxemailsperdomain/domain.tld
    The file (named after the domain), for a limit of 0, should contain a "0" and nothing else; this can be confirmed using a command like the following:
    Code:
    # cat /var/cpanel/maxemailsperdomain/domain.tld && echo
    If you wanted to check the current value of all custom limits that may have been added, you could use "grep" in a command like the following:
    Code:
    # grep -HR "" /var/cpanel/maxemailsperdomain
    The output of both of these last examples looks like the following:
    Code:
    # cat /var/cpanel/maxemailsperdomain/domain.tld && echo
    0
    
    # grep -HR "" /var/cpanel/maxemailsperdomain
    /var/cpanel/maxemailsperdomain/domain.tld:0
     
    alwaysweb likes this.
  6. impload

    impload Member

    Joined:
    Nov 2, 2009
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    If we ever want to remove or change the limit to a domain after we do this, how can it be done?
     
  7. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Edit /var/cpanel/maxemails accordingly, then run /scripts/build_maxemails_config again and you're done :)
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What yapluka has posted is correct; to remove or modify a custom limit, simply remove or edit the applicable line within the file named "maxemails" and then run the aforementioned script.
     
  9. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Is this mail limit working for mails which are sent by mail clients like outlook over a smtp connection or is it also working for mails which are sent by scripts like php newsletter?

    Thanks
    Michael
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To the best of my knowledge I believe the limit does include e-mails sent via an SMTP connection, such as from a mail client like Mozilla Thunderbird or Microsoft Outlook.
     
Loading...

Share This Page