Categories
Zimbra

Exporting Zimbra Mailboxes

When people leave the enterprise, their mailboxes should get backed up before the mail account is being deleted. Reliable Penguin has got a handy one-liner to get a ZIP archive of a particular mail box:

/opt/zimbra/bin/zmmailbox -z -m user@acme.com getRestURL '//?fmt=zip&query=is:anywhere' > filename.zip

To restore it (if needed), do:

/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL '//?fmt=zip&resolve=reset' filename.zip