We will consider a universal way to export data from a Zimbra server.
Export Domains:
zmprov gad | tee -a domains.txt
Export user emails:
zmprov -l gaa | tee -a users.txt
Export admin users:
zmprov gaaa | tee -a admins.txt
Export user settings:
mkdir users_settings for user in `cat users.txt`; do zmprov ga $user | grep -i Name: | tee -a users_settings/$user.txt ; done
Passwords:
mkdir passwords for user in `cat users.txt`; do zmprov -l ga $user userPassword | grep userPassword: | awk '{ print $2}' | tee -a passwords/$user.shadow; done
Distribution lists:
zmprov gadl | tee -a distribution_lists.txt
And the list of addresses that are included in distribution groups:
mkdir distribution_lists for list in `cat distribution_lists.txt`; do zmprov gdlm $list > distribution_lists/$list.txt ; echo "$list"; done
Aliases:
mkdir aliases for user in `cat users.txt`; do zmprov ga $user | grep zimbraMailAlias | awk '{print $2}' | tee -a aliases/$user.txt ; echo $i ; done
Similar Posts:
- Zimbra reports “ Error: Queue report unavailable – mail system is down ”
- how to check zimbra version
- zmstat high cpu usage and huge file zmstat.out
- linux shell tricks Cheat Sheet
- How to install / renew zimbra letsencrypt certificate after 30 sep 2021
1,030