How to Manage Mailbox Folder using zmmailbox CLI in Zimbra

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 user1@ehowstuff.local mailbox :

[zimbra@centos64 ~]$ zmmailbox -z -m user1@ehowstuff.local
mailbox: user1@ehowstuff.local, size: 280.60 KB, messages: 10, unread: 0
authenticated as user1@ehowstuff.local

1. How to get All Folders in user1@ehowstuff.local :
zmmailbox sub-command usage : getAllFolders or gaf

mbox user1@ehowstuff.local> 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 user1@ehowstuff.local :
zmmailbox sub-command usage : createFolder or cf

mbox user1@ehowstuff.local> cf /Personal
260

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

mbox user1@ehowstuff.local> 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 user1@ehowstuff.local :
zmmailbox sub-command usage : emptyFolder or ef

mbox user1@ehowstuff.local> ef /Personal

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

mbox user1@ehowstuff.local> 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 user1@ehowstuff.local :
zmmailbox sub-command usage : deleteFolder or df

mbox user1@ehowstuff.local> df /Personal
4 comments
  1. Himanshu
    Himanshu
    June 18, 2013 at 2:50 pm

    Hi,

    We’re interested in advertising on your blog.

    Let me know if you’re interested in discussing further about it.

    Rgds

    Himanshu

    Reply
  2. Antonio Díaz Meneses
    Antonio Díaz Meneses
    March 26, 2014 at 6:08 am

    Hello!
    How can I move items from one folder to another?

    Best regards.

    Reply
  3. Pheak
    Pheak
    October 10, 2014 at 1:31 pm

    Hello!
    First, i am sorry with my writing.
    I install Zimbra already.
    When i send email, the email was sent. But i could not received it. I don’t know how to fix it. Please me! I am first with Zimbra. I hope that you understand and help to fix it for me.
    Thz…..

    Reply
Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee