Sunday, February 25, 2024
Google search engine
HomeLinux TutorialsGet Mailbox usage report Zimbra

Get Mailbox usage report Zimbra

A way to get an emailable report of all mailboxes in a domain, their quota, usage and account status, so a domain admin can review their accounts without having to login to zimbra. (most of this is the same as viewing quota usage in zimbra admin, but this was easier, as it can then be emailed on a schedule)

Run following command as zimbra user to check all user’s mailbox size:

su - zimbra
all_accounts=`zmprov -l gaa`; for account in $all_accounts; do mbox_size=`zmmailbox -z -m $account gms`; echo "Mailbox size of $account = $mbox_size"; done ;

After running above commands you will get output in the below format:

Mailbox size of [email protected] = 5.72 KB
Mailbox size of [email protected] = 1.38 KB
Mailbox size of [email protected] = 0 B
Mailbox size of [email protected] = 19.27 MB
Mailbox size of [email protected] = 162.15 KB

or you can using simple bash script like this below

I saved this file in as, owned by zimbra.zimbra and dont forget to chmod 755

Then I just setup a cronjob crontab -e (as zimbra user) to run this at 4:01 every monday morning, and email it to them.

1 4 * * 1 /root/


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online. to search or browse the published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or more ) as a token of appreciation.

Support Us

System & Network Administrator Ninja


Please enter your comment!
Please enter your name here

2 + 15 =

- Advertisment -
Google search engine

Most Popular

Recent Comments