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


Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

4 comments:

  1. i am unable to sent the mails to externals

    ReplyDelete
  2. You posted comment on wrong windows. If you can share complete scenario about you mail server then i can help you. How are you sending mail's and which mail server you are using?

    ReplyDelete
  3. Very good blog, keep it up Shahzad :)

    ReplyDelete
  4. Thanks for sharing,get an affordable Zimbra mail server at sixthstar technologies.

    ReplyDelete