11.28 max emails per domain changed drastically

rainboy

Active Member
Mar 2, 2004
29
0
151
Eindhoven
To our horror we have found that since 11.28 the per domain max emails changed drastically; while there is still a way to make it work per domain the default has been shifted to a per account setup which in our situation (and we believe in many others situations) very unwanted.

We have clients with multiple add-on domains; often one of these domains is used to send out larger mailing lists; and this we raise the max emails for this domain only; this is not only practical it also avoids large amounts of spam send out of any other domain on the same account if things would turn ugly.

The default functionality has been shifted to the user file of cPanel, meaning it is now a global variable for the users account; once set to any number; it will overwrite all settings you ever did set on this accounts separate domains (used to be maxemails in /var/cpanel; but moved to: /var/cpanel/maxemailsperdomain/

so as long you do not set the global setting for the account, you can still use /var/cpanel/maxemailsperdomain/ to set the limit per domain.

As this is a huge change in functionality i consider this a major bug. It has not been well documented. i.e. the old maxemails is now containing a reference to : # This file is no longer in use, please update the MAX_EMAIL_PER_HOUR in the /var/cpanel/users/USER file

Which is a per user file; and not a per domain file.

While the /var/cpanel/maxemailsperdomain/ in my eyes would be more the replacement of the maxemails file as there the settings are set per domain.

So in short; cPanel has now the following limits:

Global setting (can be set in tweak settings)
an Override in the /var/cpanel/users/USER file for the complete account
an Override in the /var/cpanel/maxemailsperdomain/ for per domain tweaking

The problem is that the last will be overwritten when you use the /var/cpanel/users/USER settings

This doesnt look right to us.
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
220
6
68
Indiana, USA
We had the same isssue and we ended up setting the limits in "/var/cpanel/maxemailsperdomain/ for per domain tweaking" and chattr +i'ing this file since once it's changed it doesn't tend to get changed again very often.

It's not a perfect/good solution but it will keep the file from being overwritten.
 

Mario-cPanel

cPanel Business Development Analyst
Staff member
Oct 4, 2007
72
145
158
Houston, Texas, United States
cPanel Access Level
Website Owner
Twitter
rainboy the response in the other thread mentioned above is as follows:

We plan on adding support for a setting MAX_EMAIL_PER_HOUR-[domain] in the cpanel users file (this will have the added benefit of surviving a server-server move). This code has been completed and is awaiting QA testing.

We plan on publishing it in a 11.28.x maintenance update as soon as it has completed the dev/qa cycle.

Thank you for your patience.
We have also added a feature request to Add UI to manage hourly limits per domain thread as well.

Please let us know if this is not related or please add to the feature request thread above .

Truly appreciate your patience and understanding.
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
When i editing the file /var/cpanel/maxemails to update mail email limit per hour for particular domain i got following msg
This file is no longer in use, please update the MAX_EMAIL_PER_HOUR in the /var/cpanel/users/USER file
but there is no option to set max email limit per hour

See the following output from the file

[email protected] [/var/cpanel/users]# cat example
# cPanel -- If you edit this file directly you must run /scripts/updateuserdomains afterwards to rebuild the system caches
BWLIMIT=10485760000
[email protected]
CONTACTEMAIL2=
DEMO=0
DNS=example.com
FEATURELIST=default
HASCGI=1
IP=64.xxx.xx.xx
LANG=english
LOCALE=en
MAXADDON=0
MAXFTP=1
MAXLST=0
MAXPARK=0
MAXPOP=100
MAXSQL=5
MAXSUB=50
MTIME=1290195408
MXCHECK-example.com=0
OWNER=root
PLAN=1000
RS=x3
STARTDATE=1279428391
USER=example.com
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
When i editing the file /var/cpanel/maxemails to update mail email limit per hour for particular domain i got following msg

but there is no option to set max email limit per hour

See the following output from the file
Regarding domain-specific limits, such as MAX_EMAIL_PER_HOUR-$domain=$number, please see the following post that details the valid directives that you may add, if they do not already exist, to the cPanel users file of the desired account: ETA 11.28 Revert email hourly limits to previous behavior
 
Last edited:

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
Hi

I have added line for domain example.com at the bottom will it work ??

see below
Code:
BWLIMIT=10485760000
[email protected]
CONTACTEMAIL2=
DEMO=0
DNS=example.com
FEATURELIST=default
HASCGI=1
IP=64.xxx.xx.xx
LANG=english
LOCALE=en
MAXADDON=0
MAXFTP=1
MAXLST=0
MAXPARK=0
MAXPOP=100
MAXSQL=5
MAXSUB=50
MTIME=1290195408
MXCHECK-example.com=0
OWNER=root
PLAN=1000
RS=x3
STARTDATE=1279428391
USER=example.com
MAX_EMAIL_PER_HOUR-example.com=300
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Hi

I have added line for domain example.com at the bottom will it work ??

see below
Code:
BWLIMIT=10485760000
[email protected]
CONTACTEMAIL2=
DEMO=0
DNS=example.com
FEATURELIST=default
HASCGI=1
IP=64.xxx.xx.xx
LANG=english
LOCALE=en
MAXADDON=0
MAXFTP=1
MAXLST=0
MAXPARK=0
MAXPOP=100
MAXSQL=5
MAXSUB=50
MTIME=1290195408
MXCHECK-example.com=0
OWNER=root
PLAN=1000
RS=x3
STARTDATE=1279428391
USER=example.com
MAX_EMAIL_PER_HOUR-example.com=300
I believe your example will work OK; however, please note that if there is only one domain on the account, then you could, as an alternative, use the shorter entry of "MAX_EMAIL_PER_HOUR=300" that will have the same effect as using the domain-specific option for the primary domain of an account.

To further clarify, "MAX_EMAIL_PER_HOUR=$number" will apply to all domains on the account that do not have their own entry; using "MAX_EMAIL_PER_HOUR-$domain=$number" will override the value for a specific domain.

In the following example, a value of 300 would apply to account domains that do not have their own entry, which may be useful if there are multiple domains on the account, while a value of 600 would apply only to the domain name "exampledomain.tld":
Code:
MAX_EMAIL_PER_HOUR=300
MAX_EMAIL_PER_HOUR-exampledomain.tld=600
For additional reference, the value for the "MAX_EMAIL_PER_HOUR" option, (without the domain specified), can also be set or modified via WebHost Manager: WHM: Main >> Account Functions >> Modify an Account >> Account Limits >> Hourly Email by Domain
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
I am still little bit confuse if i add this line for user example MAX_EMAIL_PER_HOUR=300 will that work for the domain example.com only or all domains ??

MAX_EMAIL_PER_HOUR-exampledomain.tld=600 and how does work this line ???

what is the file name to update default MAX_EMAIL_PER_HOUR limit for all other domains ??
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
i have got some files checked & found file "maxemailsperhour" it is locate at /var/cpanel/maxemailsperhour

I have edited that file from 500 to 1000 but it it doesn't updated in WHM Main >> Server Configuration >> Tweak Settings
mail Max hourly emails [?]

The maximum number of emails each domain can send out per hour it is still showing 500

To make sure whether this is file is correct or not i have updated the max per hour limit to 1500 from WHM

then i verified it cat /var/cpanel/maxemailsperhour & it is showing 1500

so question is if i edit /var/cpanel/maxemailsperhour why it doesn't updating in WHM ??
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I am still little bit confuse if i add this line for user example MAX_EMAIL_PER_HOUR=300 will that work for the domain example.com only or all domains ??

MAX_EMAIL_PER_HOUR-exampledomain.tld=600 and how does work this line ???

what is the file name to update default MAX_EMAIL_PER_HOUR limit for all other domains ??
An entry like "MAX_EMAIL_PER_HOUR-$domain=$number" in a cPanel users file means that you would override all other limits so that the domain name (represented by $domain) would have a custom value set (represented by $number). The "MAX_EMAIL_PER_HOUR-$domain=$number" option is specific to just one domain and overrides both "MAX_EMAIL_PER_HOUR=$number" and also overrides the server-wide option. Important Note: "$domain" should be replaced with the actual domain name that is setup on the account, and "$number" should be replaced by the numerical value that you wish to use for the option.

If you only want to set the limit for other domains in one account, then you could use "MAX_EMAIL_PER_HOUR=$number" in the cPanel users file; this will override the server-wide option. Important Note: "$number" should be replaced by the numerical value that you wish to use for the option.

If you want to set the server-wide option, as a default to be used, then simply set the preference via WebHost Manager: WHM: Main >> Server Configuration >> Tweak Settings >> Mail >> Max hourly emails (The maximum number of emails each domain can send out per hour)

i have got some files checked & found file "maxemailsperhour" it is locate at /var/cpanel/maxemailsperhour

I have edited that file from 500 to 1000 but it it doesn't updated in WHM Main >> Server Configuration >> Tweak Settings
mail Max hourly emails [?]

The maximum number of emails each domain can send out per hour it is still showing 500

To make sure whether this is file is correct or not i have updated the max per hour limit to 1500 from WHM

then i verified it cat /var/cpanel/maxemailsperhour & it is showing 1500

so question is if i edit /var/cpanel/maxemailsperhour why it doesn't updating in WHM ??
You should use WHM to set the server-wide option. Manually editing only /var/cpanel/maxemailsperhour will not properly update the cPanel configuration. To view the value set from WHM, you could use the following command:
Code:
# grep maxemailsperhour /var/cpanel/cpanel.config