Revision as of 17:57, 17 December 2008 by Mmorse (talk | contribs) (→‎Sharing)


zmmailbox requires version ZCS 4.0+

Command Usage

zmmailbox [args] [cmd] [cmd-args ...]

 -h/--help                                display usage
 -f/--file                                use file as input stream
 -u/--url      http[s]://{host}[:{port}]  server hostname and optional port. must use admin port with -z/-a
 -a/--admin    {name}                     admin account name to auth as
 -z/--zadmin                              use zimbra admin name/password from localconfig for admin/password
 -m/--mailbox  {name}                     mailbox to open
 -p/--password {pass}                     password for admin account and/or mailbox
 -P/--passfile {file}                     read password from file
 -v/--verbose                             verbose mode (dumps full exception stack trace)
 -d/--debug                               debug mode (dumps SOAP messages)
zmmailbox is used for mailbox management. Try:
    zmmailbox help admin           help on admin-related commands
    zmmailbox help account         help on account-related commands
    zmmailbox help commands        help on all commands
    zmmailbox help contact         help on contact-related commands
    zmmailbox help conversation    help on conversation-related commands
    zmmailbox help folder          help on folder-related commands
    zmmailbox help item            help on item-related commands
    zmmailbox help message         help on message-related commands
    zmmailbox help misc            help on misc commands
    zmmailbox help search          help on search-related commands
    zmmailbox help tag             help on tag-related commands


Determining Mailbox Size

To find the mailbox size for

zmmailbox -z -m gms

You can also get this from zmprov, per server:

zmprov gqu `zmhostname`|awk {'print " "$3" "$2" "$1'}


Sharing is combination of providing access & actually mapping a folder to the share,

Permissions (modifyFolderGrant)

Mounting (createMountPoint)

Folder mount points for shared folders can be created on the command line to be accessed in the web interface. Currently, the mount points are not downloaded by the ZCO or iSync connectors and therefore must be designated manually in your 3rd party mail client, i.e., Outlook.

In this example, the administrator wishes to designate a mount point to for the shared marketing calendar located in the account for which she will have read/write permissions.

 $ zmmailbox
 mbox> adminAuthenticate -u password 
 mbox> selectMailbox
 mailbox:, size: 100.12 MB, messages: 1010, unread: 11
 mbox> getAllFolders
         Id  View      Unread   Msg Count  Path
 ----------  ----  ----------  ----------  ----------
          1  conv           0           0  /
         10  appo           0           0  /Calendar
         14  mess           0           0  /Chats
          7  cont           0           0  /Contacts
        720  mess           0           0  /Deleted Messages
          6  mess           0           0  /Drafts
          2  mess          11        1010  /Inbox
        901  conv           0           0  /Journal
          4  mess           0           0  /Junk
         12  wiki           0           0  /Notebook
        900  conv           0           0  /Outbox
          5  mess           0           0  /Sent
         15  task           0           0  /Tasks
          3  conv           0           0  /Trash

 mbox> getFolderGrant /Calendar
 Inherit  Permissions    Type  Display
 -------  -----------  ------  -------
   false        rwidx  accoun  null 
 mbox> modifyFolderGrant /Calendar account rw

 mbox> gfg /Calendar
 Inherit  Permissions    Type  Display
 -------  -----------  ------  -------
   false        rwidx  accoun  null 
   false           rw  accoun

 mbox> selectMailbox
 mailbox:, size: 251.32 MB, messages: 1543, unread: 314

 mbox> createMountpoint --view appointment /marketing-calendar /Calendar

The following command line options will perform the equivalent action to a user "albert" sharing their Calendar to another user "brian":

zmmailbox -z -m mfg -i /Calendar account none      "Permission: None"
zmmailbox -z -m mfg -i /Calendar account r         "Permission: Viewer"
zmmailbox -z -m mfg -i /Calendar account rwidx     "Permission: Manager"

Note that the last option uses "rwidx", not just "rw". -i is inherit toggeling, does not send an invite email

Also note that you can share an entire mailbox by just having the / folder. So to share an entire persons folder...

zmmailbox -z -m mfg / account r         "Permission: Viewer"

You could do any of the following [account <name> |group <name> |domain <name> |all |public| guest <email> <password>] followed by the permissions like r, rw, rwix, rwixd, rwixda, none, etc.

Types are appointment, contact, conversation, document, message, task, wiki

Sharing the entirety of an account

zmmailbox -z -m mfg / account rwixd
zmmailbox -z -m cm /shared /

Another good method for sharing everything (just for the AJAX web client & not other clients like IMAP): Mailboxes: Sharing vs. Relationships » Zimbra :: Blog

Jump to: navigation, search