Zimbra mailbox size per folder

It looks like Zimbra has an easy way to report message count per folder (zmmailbox getAllFolders), but not folder size.

Size information is buried in the database, and needs a few queries per folder to dig..

Here is a script to do it for you.. zimbra-size.sh

[zimbra@zimbra ~]$ /tmp/zimbra-size.sh sakis@zimbra.gr
sakis@zimbra.gr's max mailbox size = 20480 MB, current mailbox size = 343.02 MB.

size (MB) msgcount unread folder
--------- --------- ---------- ----------------------------
0 0 0 /Chats
0 0 0 /Drafts
12 221 221 /Inbox
15 1001 1001 /Inbox/Tickets
310 7158 7158 /Inbox/Syslog
3 78 78 /Inbox/Wiki
0 0 0 /Junk
3 21 0 /Sent
...
Advertisements