Zimbra migration

Following is a script queries the Zimbra user dictionary using zmprov gaa command line utility and then extract the most important account information into CSV file format.

The generated CSV file contains followng data:

CSV Header
Zimbra LDAP name
GivenName givenName
Surname sn
DisplayName displayName
Description description
Mail zimbraMailDeliveryAddress I chose that LDAP field since it seems to appear only once per user account.
Mail field would appear one or more times depending on the number of aliases.
zimbraPrefMailForwardingAddress zimbraPrefMailForwardingAddress
zimbraPrefMailSignature zimbraPrefMailSignature
zimbraAccountStatus zimbraAccountStatus
zimbraMailStatus zimbraMailStatus
zimbraLastLogonTimestamp zimbraLastLogonTimestamp
zimbraPasswordLocked zimbraPasswordLocked
Alias1 zimbraMailAlias Script will attempt to extract upto 9 email aliases.
Code would need to be extended if your user accounts have mote then 9 aliases.
Alias2 zimbraMailAlias
Alias3 zimbraMailAlias
Alias4 zimbraMailAlias
Alias5 zimbraMailAlias
Alias6 zimbraMailAlias
Alias7 zimbraMailAlias
Alias8 zimbraMailAlias
Alias9 zimbraMailAlias

This script has been used only once for one environment and it might need some tuning for something I have not considered.

It also takes a long time for the script to executed which in my case was around 10 min for 100 accounts.

Maciej Zaleski,
25 Aug 2009, 04:22
Maciej Zaleski,
20 Sep 2009, 11:16