How to Manage Mailbox Folder using zmmailbox CLI in Zimbra

Share this Article :

Zimbra zmmailbox command is used for mailbox management such as admin-related commands, account-related commands, appoint-related commands, folder-related commands, message-related commands, tag-related commands and etc. It is the powerful command utility for zimbra administrator to perform daily account management or to perform zimbra account related issues. This post will brief you on how you can manage, get, create, delete and Empty the Folder in zimbra mailbox using zmmailbox command line interface (CLI). All the command has been tested in Zimbra Collaboration Suite 8.0.4 installed on CentOS 6.4.

Using zmmailbox command, enter to [email protected] mailbox :

[[email protected] ~]$ zmmailbox -z -m [email protected]
mailbox: [email protected], size: 280.60 KB, messages: 10, unread: 0
authenticated as [email protected]

1. How to get All Folders in [email protected] :
zmmailbox sub-command usage : getAllFolders or gaf

mbox [email protected]> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

2. How to create Folder in [email protected] :
zmmailbox sub-command usage : createFolder or cf

mbox [email protected]> cf /Personal
260

Once you created Personal folder, please move some files into /Personal. Then run getAllFolders or gaf.

mbox [email protected]> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
       294  unkn           0           2  /Personal
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

3. How to Empty Folder in [email protected] :
zmmailbox sub-command usage : emptyFolder or ef

mbox [email protected]> ef /Personal

Once folder /Personal has been empty, rerun etAllFolders or gaf again to verify.

mbox [email protected]> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
       294  unkn           0           0  /Personal
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

4. How to Delete Folder in [email protected] :
zmmailbox sub-command usage : deleteFolder or df

mbox [email protected]> df /Personal

3 Comments

  1. Himanshu
  2. Antonio Díaz Meneses
  3. Pheak

Leave a Reply