Zimbra: Manipulate mailbox from CLI

Zimbra: Manipulate mailbox from CLI

Zimbra: Manipulate mailbox from CLI 150 150 Roderick Derks

The command that manipulates mailboxes from CLI is zmmailbox. The following features are very usable:

 

  • Place user account into maintenance mode. This will prevent delivery of new mail messages until we finish with the backup procedure:

    zmprov ma <user> zimbraAccountStatus maintenance 
  • Archive user's mailbox in tar.gz format:

    zmmailbox -z -m <user> getRestURL "//?fmt=tgz" > /tmp/<user>.tar.gz 
  • Empty Inbox folder:

    zmmailbox -z -m <sgros> ef /Inbox 
  • Restore user's mailbox from tar.gz format:

    zmmailbox -z -m <user> postRestURL "//?fmt=tgz&resolve=reset" /tmp/<user>.tgz
  • Put user's account into active mode:

    zmprov ma <user> zimbraAccountStatus active 

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message