Read carefully this article to check mailbox size of all accounts in Zimbra server
To check mailbox size of a particular mail account
#su – zimbra
$zmprov gmi testuser@domain.com
$zmprov gmi testuser@domain.com
To check User mailbox Size in detail. This command show every Directory size and count of message like inbox, trash, Junk, draft and
$zmmailbox -z -m testuser@domain.com gms
# show only mailbox size
$zmmailbox -z -m testuser@domain.com gaf
#show specific directory size in detail
gms – get mailbox size
gaf – get all file
Check mailbox size of all mail accounts.
#!/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
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
Note:: The above script must be execute from zimbra user.