How to check status of mailbox quota in Zimbra Mail server

In this tutorial i will show you how to check status of mailbox quota in Zimbra Mail server and you can get used and define quota of each zimbra account using this tutorial.

Step:
1. Login in Zimbra admin panel
2. Go to Monitor Option 
3. Server Statistics 
4. Double client on domain (example.com)
5. Mailbox Quota

GUI Snapshot


Check Mailbox Quota size Using CLI

$ zmprov ga shahzad@example.com | grep zimbraMailQuota
zimbraMailQuota: 10485760

Note: size 10485760 byte 

Check Mailbox Used quota per account

$ zmmailbox -z -m shahzad@example.com  gms
0 B

How to check mailbox size of All account using script

$ cd /opt/zimbra/backup/
# vim mailboxsize.sh

#!/bin/bash
all_account=`zmprov -l gaa`;
for account in ${all_account}
do
mb_size=`zmmailbox -z -m ${account} gms`;
echo .Mailbox size of ${account} = ${mb_size}.;
done


$ chmod o+x mailboxsize.sh


$ ./mailboxsize.sh
or,
$sh mailboxsize.sh

Or, you can also check mailbox size using below method

User list
$cat /opt/zimbra/backup/shahzad/userlist
abc@example.com
shahzd@example.com

$ vim mailboxsize1.sh
#!/bin/bash
for account in `cat /opt/zimbra/backup/shahzad/userlist`
do
mb_size=`zmmailbox -z -m ${account} gms`;
echo "Mailbox size of ${account} = ${mb_size}";
done

$chmod o+x mailboxsize1.sh
$./mailboxsize1.sh

Check COS email account quota default value

$ zmprov -l gc default | grep zimbraMailQuota

zimbraMailQuota: 0

Note: 0 = unlimited size, it means each account have unlimited mailbox size. You can change this value from zimbra admin panel or from CLI mode.

From GUI change default quota value
Chnage quota value accordingly and as you will change quota value in COS, after define value will be apply in all email account.


From CLI
$ zmprov mc default zimbraMailQuota 30000000

Note : 30000000 byte is account quota value which i have changed.

Check status of COS quota value from CLI

$ zmprov -l gc default | grep zimbraMailQuota
zimbraMailQuota: 30000000