How to export address book from Zimbra

email-servermigrationzimbra

I want to export all users' contacts (Address book) in csv format for migration purpose.
Zimbra is runing on ubuntu and I want to do this from cli.
How shall I proceed?
I have refereed to this link but this is not an option for me.

Kindly let me know if you want any more details.

Best Answer

Not sure if you want to do this on a Zimbra server, but if it is a server you can use zmmailbox with a getRestUrl for almost all things that can be done in the web interface. Become the zimbra user

zmmailbox -z -m mail@domain.com -t 0 getRestURL "//contacts?fmt=csv"

This is a basic csv export, mainly compatible with Zimbra. You can make the exports more compatible with other applications by replacing the csv with one of the following options:

  • zimbra-csv
  • yahoo-csv
  • thunderbird-csv
  • outlook-2000-csv
  • outlook-2003-csv

To make an outlook 2003 compatible export you the command changes to:

zmmailbox -z -m mail@domain.com -t 0 getRestURL "//contacts?fmt=outlook-2003-csv"

To make an export from a different adressbook, you can use the name of that adressbook f.e.:

zmmailbox -z -m mail@domain.com -t 0 getRestURL "//privatecontacts?fmt=outlook-2003-csv"