Maximum number of emails per hour, why it is in WHM when accounts already overriding this setting?

postcd

Well-Known Member
Oct 22, 2010
720
20
68
In WHM / Tweak Settings / Mail i have "The maximum number of emails each domain can send out per hour." set to 200

but the cpanel account packages has this setting too. So why there is the setting in Tweak Settings when its already overriden by packages? Isnt it confusing?
 

server9host

Well-Known Member
Sep 18, 2013
160
0
16
India
cPanel Access Level
Root Administrator
Re: Maximum number of emails per hour, why it is in WHM when accounts already overriding this settin

Hello,


From package we set email limit per hour for particular domain name and via using tweak setting we set limit on server wide.

So administrator can set different different limit as per package for some domain to restrict limit. e.g for server wide limit set 300 and for some domain want 100 email per hour then using package we can do this easily.


Thanks
 

postcd

Well-Known Member
Oct 22, 2010
720
20
68
Re: Maximum number of emails per hour, why it is in WHM when accounts already overriding this settin

Thx, that is interesting. So yours mentioned 300 mails server wide limit (in Tweak settings) is like each account can send 300 mails per hour even they have set Unlimitted in its cpanel packages? I think its not true as per this topic of mine where i experience cpanel is sending more then this server wide limit... So im confused still what is this server wide limit good for, its cumulative for all accounts?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
Re: Maximum number of emails per hour, why it is in WHM when accounts already overriding this settin

Hello :)

The values configured in WHM's Tweak Settings interface are the default values. Assigning different values on a per-account or per-domain basis will take precedence over the default values configured in Tweak Settings. This is documented at:

How to set Email Limits

Thank you.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
Package based limits are not mentioned in that document.

If I modify the max emails per hour limit in a package, will that update and overwrite an individual limit?

As a side note, when a package was edited in WHM, this used to trigger an updateof all users limits - does this still happen? I'm only asking this because I would rather replace the files in /var/cpanel/packages via the command line, but I'm concerned this would have no effect.

Can you please clarify?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
If I modify the max emails per hour limit in a package, will that update and overwrite an individual limit?
Hello,

Yes, the package limits are the same thing as the individual limits because modifying the package alters the individual value assigned to the account. This should happen automatically when editing a package.

Thank you.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
Might be a good idea to add that to your documentation.

Is there a script I can run to update individual limits from the packages from the command line? I ask this because quite often we will copy the plans into /var/cpanel/packages. Doing this will not update anything, so it would be nice to run a single command to do so, rather than login to WHM on every server and edit / save all the packages manually.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
Hello,

You would have to use the editpkg WHM API 1 function if you wanted to update the packages from the command line and have it apply to all existing accounts using that package:

WHM API 1 - editpkg

cPanel version 11.50 introduces the "/usr/local/cpanel/scripts/modify_packages" script, but it's only intended for updating the theme at this time.

Thank you.