This script brings a complete synchronization of user accounts and groups from an external LDAP server.
This script brings a complete synchronization of user accounts and groups from an external LDAP server.
@ -12,11 +12,17 @@ The goals are :
* Handle email alias defined in LDAP, and translate them into aliases in Zimbra
* Handle email alias defined in LDAP, and translate them into aliases in Zimbra
* Allow objects (aliase, distribution list) to be created directly in Zimbra. Objects coming from LDAP are synchronized, including alias previously defined in LDAP which aren't anymore are removed from Zimbra. But aliases defined directly in Zimbra won't be touched. Same is true for distribution lists. So you can mix LDAP defined and Zimbra defined configuration
* Allow objects (aliase, distribution list) to be created directly in Zimbra. Objects coming from LDAP are synchronized, including alias previously defined in LDAP which aren't anymore are removed from Zimbra. But aliases defined directly in Zimbra won't be touched. Same is true for distribution lists. So you can mix LDAP defined and Zimbra defined configuration
A few other features are included, like :
* Creating domains
* Creating / removing domain aliases
All from a simple yaml configuration file
## Configuration
## Configuration
The configuration is stored in a single file in YAML format. The script will look for a config at /opt/zimbra/conf/zmldapsync.yml or trhe one specified in the --config argument.
The configuration is stored in a single file in YAML format. The script will look for a config at /opt/zimbra/conf/zmldapsync.yml or the one specified in the --config argument.
The config has two main section :
The config has two main sections :
* general : settings which affects all domains, mainly to configure email notification in case of error
* general : settings which affects all domains, mainly to configure email notification in case of error
* domains : list of domain to sync, and the settings for each of them
* domains : list of domain to sync, and the settings for each of them
@ -142,6 +148,10 @@ domains:
# If the domain in Zimbra exists but is not configured
# If the domain in Zimbra exists but is not configured
# for external auth (either LDAP or AD), should this script configure it ?
# for external auth (either LDAP or AD), should this script configure it ?
setup_ldap_auth: True
setup_ldap_auth: True
# If defined, domain aliases will be added to / removed from Zimbra according to this list