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 [email protected]
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 [email protected] gms # show only mailbox size
$zmmailbox -z -m [email protected] 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
WHO=`whoami`
if [ $WHO = “zimbra” ]
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
else
echo “Execute this script as user zimbra (\”su – zimbra\”)”
fi
:wq
# chmod 755
# ./zmchkmailsize.sh












