article referer : http://www.aoddy.com/2008/12/01/how-to-check-mailbox-size-of-all-accounts-in-zimbra-mail-server/
today as usuall when i am trying to search the total amount of mail account for my domain i use zmaccts
# su simbra
$ zmaccts
domain summary
domain active closed locked maintenance total
———————– ——– ——– ——– ————- ——–
test.org 9915 0 1 1 9977
okay i need to found out the mailbox sizzimbra account, then i found this http://www.aoddy.com/2008/12/01/how-to-check-mailbox-size-of-all-accounts-in-zimbra-mail-server basicly you use 2 commands for query.
- 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.
just create a new files you can name it checkmailsize.sh or what ever you wanted then paste this
#!/bin/bash all_account=`zmprov gaa`; for account in ${all_account} do mb_size=`zmmailbox -z -m ${account} gms`; echo "Mailbox size of ${account} = ${mb_size}"; done
# su zimbra
# vim checkmailsize.sh
# chmod 755
# ./checkmailsize.sh
Mailbox size of admin@test.org = 307.26 KB
Mailbox size of wiki@test.org = 8.93 KB
Mailbox size of spam.sg2zug9zgx@test.org = 0 B
Mailbox size of ham.y9zixmhtd@test.org = 0 B
Mailbox size of ihe-ina@test.org = 424.32 MB
Mailbox size of info@test.org = 169.24 MB