Hi all,
I've had the repeated problem of users not knowing where their storage is really being used. When a user has 100+ folders/subfolders, telling them to mouse over each one to find which is taking a lot of space is not the best solution. I created this the attached script for this.
It will take as an argument a specific username. It currently assumes that there is only one domain name (this will be modified later if there is interest).
ex:
folder_size_check.py chauvetp
It will print a list of all folders the user has over 10MB in size. Example output:
Inbox -- total size of folder: 119 MB, in 753 messages
Sent -- total size of folder: 76 MB, in 1774 messages
Trash -- total size of folder: 50 MB, in 1041 messages
Its a work in progress and isn't the neatest program in the world but does the job I needed it to. I figured others might benefit from it. If you have questions or suggestions, please let me know.
Requirements:
- Must be run on the Zimbra server
- Python 2.4 or later
- Python's MySQL & LDAP libraries