-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 2 Jun 2017, Sandbox wrote:
I have two LDAP domains, which has some equal users, eg:
abc@domain1.com abc@domain2.com
This works fine except one thing: i cant set up the ldap query to choose the correct maildir if the user names are equal.
Well the most problem is that you have two LDAP servers with different content.
Is it possible to use a user_filter which will choose the correct maildir and user/domain from the email address?
My current ldap.conf for domain1:
hosts = ldap.domain1.com base = ou=People,dc=domain1,dc=com ldap_version = 3 user_attrs = uid=user user_filter = (uid=%n) pass_attrs = uid=user,userPassword=password pass_filter = (uid=%n) default_pass_scheme = MD5
and for domain2: hosts = ldap.domain2.com base = ou=People,dc=domain2,dc=com ldap_version = 3 user_attrs =
=mail=maildir:/home/vmail/%{ldap:departmentNumber)/%n/Maildir user_filter = (uid=%n) pass_attrs = uid=%n,userPassword=password pass_filter = (uid=%n) default_pass_scheme = MD5
you have one LDAP conf per domain and two userdb's, right?
Can you make use of ${domain} in one of the LDAP servers, is the domain present in the user entries?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBWTEeOXz1H7kL/d9rAQKgKAf+NgTeS/4p/BPFwiP7pFXvn1K0cNRvBLcA n6sDHQPebxnVxotRPomblaXoHVpYHPY9PlADQ6tF0g0ZjVuXeYdQuF5Yxy8pJgKb Wyy12H2kLOCbN4rbFEGJqxL9301mMQLfgIRe4EbDi4BdXRjyBNvIYU+6M2BYXHTx VNTXcsql18tmjJufN5/7XeVFpd3LVC4o6v2W99N88JLi2GJjpPVYGiyMrRmdGTOI XL75q8wg9Zoh6FKu+fdocDUpsFvxmraMChsagJScdHvG2pfMj26J87aJzHJ43zZe GhzI7fwCbuVWZ4mGyZNB4Age7MjO0yaeqCVR/M29dUPv3Xtl8Z7NCg== =qnQp -----END PGP SIGNATURE-----