Is there a way to remove "unlimited" as an email quota option in cPanel?

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
All too many times, we have discovered an unattended email account on the server which has been given an unlimited quota, and full of years of accumulated junk email, literally gigabytes of spam.

We really need to take unlimited off the table as an option for the email accounts we host. Is there an easy way to accomplish this?

Thanks very much.
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Yes, there is a way. If you are using cPanel/WHM version higher than 11.28, there is an option available in WHM -> Tweak Settings.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Thanks much, but I am not finding the option you refer to.

Currently using WHM 11.32.2 (build 18).

I see, "Default quota option for new email accounts", but even if set (which we do) this does not restrict the Unlimited quota setting from being used.
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

I see, "Default quota option for new email accounts", but even if set (which we do) this does not restrict the Unlimited quota setting from being used.
Hmm. In this case, I do not think so if there is anything we can do directly from WHM frontend to restrict email account quota. It may be possible through coding but I am not much aware about this.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Okay thanks anyway for your response.

I truly wish there were a way to do this.

I don't even care about limiting the actual number that folks can enter. It's just that the "unlimited" option is just too much of a temptation to select because one does not have to put the slightest bit of "brain work" toward figuring out what one's true needs are in this regard.

Then of course about half of the customers who select this option end up complaining at some point that their Outlook refuses to download any email. Then when we see that the Unlimited quota has been set, and there are 20GB of messages in the account going all the way back to 2004.... well IMHO, eventually the Unlimited quota option leads, at least in part, to an unnecessary amount of customer grief and support calls, year after year.

So perhaps there needs to be a feature request, say for example, that there is a default email quota limit that we could set in WHM?
 
Last edited:

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Okay, here:

Email Accounts

I am finding this:

Note: You will not be able to exceed the quota set by your web host.


So the question becomes, how exactly does the "web host" establish the limiting quota suggested here in the cPanel docs?
 

m8internet

Member
Jan 2, 2011
21
0
51
Cumbernauld, Scotland, UK
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

This is a little misleading
If you create / edit the package, you can set the email account with up to 2048MB by default
If you set anything greater than 2048MB then it shows as unlimited

So what you now need to do is establish from the cpanel / WHM licence owner what limit they have set
If they have set anything greater than 2048MB, then the package can be set with unlimited showing
If they have set anything less than 2040MB, then the package can be set with unlimited showing but limited to 2048MB

Therefore "unlimited" always remains as an option visible to the client, even though it may not be applicable
If you have set a quota limit of up to 2048MB, then you can test this by attempting to change from the default to unlimited
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Thanks but I don't quite understand your response.

What I am looking for is a way to establish a global limit for every email account currently on the sever, and/or for every new account. Let's say something like 200mb or 300mb. This would greatly help to avoid the issues that arise here commonly with gargantuan dormant email accounts on the server, as I described earlier.
 

m8internet

Member
Jan 2, 2011
21
0
51
Cumbernauld, Scotland, UK
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Thanks but I don't quite understand your response
As above, try it and see what happens

I requested a change in this a long time ago, but was advised the unlimited option could not be removed...
Instead the limit had to be applied on a per package and per account basis

It is rather silly when you apply limits on all other variables, then customers can still "unlimited" on the email quota

I therefore had to add a Knowledgebase item on my website that the limit is 500MB per account
If customers require more than this, then they should submit a support ticket
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Thanks, but when you say, "As above, try it and see what happens..." Ahhh try what?

When you say, "If you create / edit the package, you can set the email account with up to 2048MB by default". How so?

When I go to WHM ---> Packages ---> Edit a Package, and then look at one of the hosting account packages we have established, there is no such field/setting to establish, limit, reset, etc. the quota for the email accounts created with that package. The only quota setting here is for the entire account.

Am I missing something here?
 

m8internet

Member
Jan 2, 2011
21
0
51
Cumbernauld, Scotland, UK
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Thanks, but when you say, "As above, try it and see what happens..." Ahhh try what?
See :
post #7 above
Vary the settings on an account once you have applied the mail limit

If you are unable to see any mail limits on a new package, then you probably don't have permission to modify this
In which case you need to refer to the line above and contact your provider to see what they have set (in most cases it is 2048MB)

Presumably when you view an account you see radio buttons for :
250MB (variable)
unlimited
 
Last edited:

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

"Vary the settings on an account once you have applied the mail limit "

Huh? There is absolutely no way that I can find to "apply the mail limit" in WHM. I have also been communicating with the cPanel.net techs via a trouble ticket I started on this. They also confirm that there is currently no way to specify the quota limit for any hosted email account, that is, without logging into their cPanel and adjusting the quota the same way that they could.

So if you know something about this, that everyone seems to be missing, then by all means post the detail here and I am sure that it will be vastly appreciated by those who have been asking for this feature for years.


"If you are unable to see any mail limits on a new package, then you probably don't have permission to modify this..."

We are the hosting provider, it is our server. I am using root access all the way.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

WHM > Server Configuration > Tweak Settings, Mail tab. Bottom of list:

Default user-defined quota value for new email accounts (maximum: 2,048) [?]
This is the value that is prefilled in the quota box for new email accounts on supported themes

Default quota option for new email accounts [?]
This determines which option is preselected in the interface used to add new email accounts in cPanel on supported themes
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

It is possible to remove the unlimited radio button if you clone the theme in WHM > Themes > Universal Theme Manager > cPanel Manage Themes area to name it another theme (such as x3-new), then if you were to revise the interface files that appear to be in the following locations:

/usr/local/cpanel/base/frontend/x3-new/mail/pops.html
/usr/local/cpanel/base/frontend/x3-new/js2/mail/pops.js
/usr/local/cpanel/base/frontend/x3-new/js2-min/mail/pops.js

You might even try moving the js2-min/mail/pops.js file entirely to avoid editing it, since you don't necessarily have to provide a less javascript version for that page.

I cannot state what to edit exactly, since a few of the edits I tried resulted in the page not saving and I don't typically clone and revise themes. It is possible to do it, though, and those are indeed the files handling that option. You would want to look for quota_unlimited entries specifically in those files.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

WHM > Server Configuration > Tweak Settings, Mail tab. Bottom of list:
Yes but this is in reference to the initial email account default quota. This has nothing to do with establishing a limit against how high that quota can be set (by the hosted member).
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

It is possible to remove the unlimited radio button if you clone the theme in WHM > Themes > Universal Theme Manager > cPanel Manage Themes area to name it another theme (such as x3-new), then if you were to revise the interface files that appear to be in the following locations:

/usr/local/cpanel/base/frontend/x3-new/mail/pops.html
/usr/local/cpanel/base/frontend/x3-new/js2/mail/pops.js
/usr/local/cpanel/base/frontend/x3-new/js2-min/mail/pops.js

You might even try moving the js2-min/mail/pops.js file entirely to avoid editing it, since you don't necessarily have to provide a less javascript version for that page.

I cannot state what to edit exactly, since a few of the edits I tried resulted in the page not saving and I don't typically clone and revise themes. It is possible to do it, though, and those are indeed the files handling that option. You would want to look for quota_unlimited entries specifically in those files.
Thanks very much for your response Tristan, Yes, this is exactly what I was looking for.

I don't quote understand the use of the word "clone" in your description. Do you mean just to dupe/copy the file, e.g. with the cp command at shell?

In my usual approach with this kind of thing, I would just copy each file to keep the original around, just in case. Then proceed to edit the active files.

Now, wouldn't the next cPanel update override my edits? Is there a way of keeping these in tact? or is that what the cloning is all about?

I'm still sorta confused, but thanks for getting me this far!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

If you visit the WHM > Themes > Universal Theme Manager > cPanel Manage Themes area to see the options there, one is entitled "Clone" next to x3 theme. You would want to clone the theme, since you'd need to switch the accounts over to that new theme that you create.

Of note, revising the x3 theme directly isn't advisable, since those revisions will be overwritten on cPanel updates.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Okay, I get it. Clone the theme, make revisions to the clone, then move everyone's account over to the cloned version. Sounds good, unless I suppose we would then be removing the new/cloned them from any super critical updates that may come down the pike from cPanel.net thereafter. Not too sure what the ramifications would be in this case.

Also of course we would need to remove the feature for the individual cPanel account members to change themes. Hmmmm, requires further thought but yes, I see that at least something like this is possible thanks to your input. Thanks once again.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Certainly, I'm glad to be of help in pointing out a direction you might take to try to achieve this feature.
 

travis_ss

Member
Oct 5, 2012
6
0
1
cPanel Access Level
Root Administrator
Re: Is there a way to remove "unlimited" as an email quota option in cPanel

Certainly, I'm glad to be of help in pointing out a direction you might take to try to achieve this feature.
Thanks for this great support. I also achieved by restricting plan email quotas through themes.

However, I can see that even after implementing this, existing created email quotas are still the same as user created, they have not changed to the one which I mentioned. So, this is worrying me.

There are hundreds of existing accounts, so it is impossible for me to go to each account's cPanel separately and then change each email's quota. Please suggest me a way in which I can reset quota of all existing created emails on server in one shot. It is fine if I can set quota to default mentioned in Tweak Settings but I must do it through command to save days of doing manually.

Thanks