How to check mailbox size of all accounts in Zimbra mail server.

Zimbra Mail

Today, I would like to know a mailbox size of all users in my Zimbra mail server and I can check these sizes by create a shell script which has 2 commands for query.

  1. zmprov gaa => I use this command for query all accounts in my Zimbra server.
  2. zmmailbox -z -m your-account gms => Get mailbox size of your-account account.

Anyway, You can download my script too.


all_account=`zmprov gaa`;
for account in ${all_account}
    mb_size=`zmmailbox -z -m ${account} gms`;
    echo "Mailbox size of ${account} = ${mb_size}";


0 0 votes
Article Rating
Inline Feedbacks
View all comments
Florian Lambert
9 years ago


I had the same need but zmmailbox gms takes too long.
So I wrote a little script. This script read in the zimbra mysql the size_checkpoint.

Example :
su – zimbra