How to delete message from zimbra mail account command line CLI
1) Delete All messages from a zimbra Account Use below command,<See backup and restore Zimbra>
root@knowledgleLinux[~]$ su zimbra [zimbra@mail root]$ zmmailbox -z -m test1@knowledgelinux.com emptyFolder /Inbox
2) Delete particulate message from zimbra mail account. use below command to get message ID
root@knowledgleLinux[~]$ su zimbra [zimbra@mail root]$zmmailbox -z -m test@knowledgelinux.com s -t message -l 10 "in:inbox date:01/01/2016"
3) Above command will search a specific folder, Inbox in this case. Displays only messages dated 01/01/2016. Lists up to 10 messages.
Id Type From Subject Date ---- ---- ---------------- ------------------------------------------ -------------- 1. 45 mess user Daily mail report for 2015-01-01 01/01/15 23:30 2. 12 mess user ZCS Backup Report: SUCCESS 01/01/15 01:00
5) Get message ID from Above list, and run below command
root@knowledgleLinux[~]$ su zimbra [zimbra@mail root] zmmailbox -z -m admin@william3.us.zimbralab.com deleteMessage 12