Zimbra command to check Mailbox Size :


Use This command to get User mailbox size information. this command will be executed by zimbra user.

$su – zimbra
$zmprov gmi sathish@www.sathish.com



To check User mailbox Size information in detail. This command show every Directory size and count of message like inbox, trash, Junk, draft and

$zmmailbox -z -m testuser@example.com gms # show only mailbox size

$zmmailbox -z -m testuser@example.com gaf #show specific directory size in detail



Check Mailbox size of all accounts in zimbra mail server by Script

zmprov gaa         =>        I use this command for query all accounts in my Zimbra server.

zmmailbox -z -m your-account gms      =>       Get mailbox size of your-account account.


$su – zimbra

$vi zmchkmailsize.sh

if [ $WHO = “zimbra” ]
all_account=`zmprov -l gaa`;
for account in ${all_account}
mb_size=`zmmailbox -z -m ${account} gms`;
echo “Mailbox size of ${account} = ${mb_size}”;
echo “Execute this script as user zimbra (\”su – zimbra\”)”



# chmod 755
# ./zmchkmailsize.sh