Zimbra: Easy Purging/Deleting all mail from an mailbox in Zimbra
What happens if a zimbra user’s mailbox is full? All incoming emails will bounce.
Today, I want to post how to easily delete or empty the Zimbra user’s mailbox from the webmail browser and from the command line.
I’ll describe it in several ways.
Zimbra Webmail
This is the easiest way; normal users and administrators can do this.
First, we have to log into webmail from the browser.
Check the message inbox where you want to delete.

And then, jump to the “Trash” folder and delete again.

If the “Trash” folder is not deleted, too, the mailbox size will not change.
Via Command Line “ZMMAILBOX”
This is done via the command line, so you must connect with SSH. For Mac OS users can use Terminal, and for Windows users, use PuTTY.
SSH into the zimbra mail server.
$ssh [email protected] enter [password]
switch to root and then zimbra user
user@server:~$ sudo su enter root [password] user@server:~# su – zimbra
Run the commands below as zimbra user
Run the commands below as the zimbra user.
$ zmmailbox -z -m [email protected] emptyFolder /Inbox
Or
$ zmmailbox -a admin -p 'your-admin-password' -m [email protected] emptyFolder /Inbox
Or
zmmailbox
mbox> adminAuthenticate -u https://server.domain.com:7071 [email protected] 'your-admin-password'
mbox> selectMailbox [email protected]
mbox [email protected]> emptyFolder /Inbox