Note: the commands listed below apply to ZCS 7.x Network Edition and may need to change to work with other versions. Specifically, I believe only the Network Edition includes the built-in backup facility, although hopefully one of the other options will be of use.
If the Zimbra LDAP server is still functioning, you should be able to retrieve the address information with something like:
su - zimbra
/opt/zimbra/libexec/zmslapcat /tmp
egrep '^(zimbraMailAlias|zimbraMailDeliveryAddress):' /tmp/ldap.bak
If the LDAP server is unavailable, but you have access to the location Zimbra is configured to backup to (the default is /opt/zimbra/backup
), it should have a copy of the LDAP data for each successful backup. Use:
find /opt/zimbra/backup -maxdepth 3 -name ldap -exec ls -ld {}/ldap.bak ';'
to show all copies that are available, and then select the most recent file. Then you can use grep to extract the email addresses from this file as mentioned above.
If both the LDAP server and /opt/zimbra/backup
are not available, there might be a copy of ldap.bak
in /opt/zimbra/data/ldap
. I believe this copy is only updated when the system is patched though.
Note: Depending on exactly how the system crashed, it might be possible to recover the LDAP information using the db_recover
tool. If this type of recovery is required, you should open a new question as it is outside the scope of this one, but here are some starting points:
Sources: