Mass change email quotas for domain

flamewalker

Verified User
Joined
Aug 21, 2007
Messages
64
I have looked for a relatively easy answer but can't find one...

Looking for a way to change all the email quotas for one domain (our primary one). Currently they are all set to unlimited. Naturally we have some users with inordinately large mailboxes.

I really don't want to have to go click change quota on some 400+ email accounts if I don't have to!

TIA
 
This should work:

Code:
sed -i "s/:0/:10485760/" /etc/virtual/DOMAIN/quota

Ofc, change DOMAIN with real domain name and 1024000 (10MB) with the value you want to be as quota. (the 0 is the current quota, unlimited).

Please keep in mind that this will change quota for ALL accounts of that domain.

Regards

EDIT: Changed the correct value for 10MB, now is sure, make as described.

Regards
 
Last edited:
Awesome thanks! I will have to change a couple dozen immediately so they don't start bouncing email but that is a lot easier than changing 400! :D

FYI looks like the quota is set as bits in the quota file
IE: 104857600 = 100mb.
 
Last edited:
Apparently all the email account names aren't listed in the quota file. Any ideas why that might be? Could it be that when I imported the accounts with my script from our old server that the API didn't add them since they have no limit when I imported them?
 
mmmh that's strange, ive all my accounts, the unlimited aswell are just :0

Maybe you should ask da staff about this, honestly ive no idea

Regards
 
I should be totally wrong with this, but, maybe using the da backup will create the correct complete file inside the tar.gz file, maybe uncompressing it from there (making a backup of quota file first) should solve your "missing address" problem

Should be worth a try

Regards
 
Back
Top