User Tools

Site Tools


internet:mail:zimbra:zimbra_cli

This is an old revision of the document!


Zimbra Command Line Tools

Command Line Tools

Delete All Mail in a Folder

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

Delete All Mail in an Account

:!: 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="gcooper@ronsconcrete.com"
for FOLDER in `zmmailbox -z -m $ACCOUNT gaf |awk '/\// {print $5}'|sort|uniq` ; do zmmailbox -z -m $ACCOUNT emptyFolder $FOLDER ; done
unset ACCOUNT
internet/mail/zimbra/zimbra_cli.1476379220.txt.gz · Last modified: 2016/10/13 11:20 by gcooper