Deleting messages from account using the CLI

Revision as of 17:35, 11 July 2015 by Jorge de la Cruz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Deleting messages from account using the CLI

   KB 21721        Last updated on 2015-07-11  

(0 votes)


CLI method for deleting messages off a specific user account.


In order to delete the message, you need to identify the message "msgid". First, note which user you are trying to delete (replace with the user you are trying to target), then issue the following command to find the message "msgid" that you want to delete:

zmmailbox -z -m s -t message -l 50 "in:inbox date:01/01/2015"

The above command will search a specific folder, Inbox in this case. Displays only messages dated 01/01/2015. Lists up to 50 messages.

You will see something like the following after issuing the above command:

   Id    Type   From              Subject                                     Date   
   ----  ----   ----------------  ------------------------------------------  --------------
1. 432    mess  user              Daily mail report for 2015-01-01            01/01/15 23:30
2. 431    mess  user              ZCS Backup Report: SUCCESS                  01/01/15 01:00

The "msgid" is the first column labeled "Id".

This number can be used to delete the message by issuing the following command:

zmmailbox -z -m deleteMessage 431

Additional Content

Verified Against: Zimbra Collaboration 8.5, 8.6 Date Created: 02/15/2015
Article ID: Date Modified: 2015-07-11

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Wiki/KB reviewed by Fred Raunaq Jenny Last edit by Jorge de la Cruz
Jump to: navigation, search