This is an old revision of the document!
http://wiki.zimbra.com/wiki/Zmmailbox
http://wiki.zimbra.com/wiki/Zmprov_Examples
http://wiki.zimbra.com/wiki/Administration_Console_and_CLI_Certificate_Tools
First, you might want to move all folders you want to delete, then run the following command on “/Trash”.
zmmailbox -z -m admin@domain.com emptyFolder /foldernamelikeInbox
The above command may be less dangerous to use, but may be a little more work.
Lightly tested - Throws a couple of errors, but seems to work OK.
export ACCOUNT="username@mydomain.com" for FOLDER in `zmmailbox -z -m $ACCOUNT gaf |awk '/\// {print $5}'|sort|uniq` ; do zmmailbox -z -m $ACCOUNT emptyFolder $FOLDER ; done unset ACCOUNT
su - zimbra zmprov -l gaa |grep -v -e galsync -e spam -e ham -e virus > /tmp/zimbra_users.txt