您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

57 行
1.6KB

  1. # Authentication for LDAP users. Included from auth.conf.
  2. #
  3. # <https://doc.dovecot.org/latest/core/config/auth/databases/ldap.html>
  4. ## See <https://doc.dovecot.org/latest/core/config/dict.html#ldap>
  5. ldap_uris = ldap://${LDAP_SERVER_HOST}
  6. ldap_auth_dn = ${LDAP_BIND_DN}
  7. ldap_auth_dn_password = ${LDAP_BIND_PWD}
  8. ldap_base = ${LDAP_SEARCH_BASE}
  9. ldap_version = 3
  10. passdb ldap {
  11. filter = (&(objectClass=PostfixBookMailAccount)(|(uniqueIdentifier=%{user})(mail=%{user})))
  12. # ldap_bind = no
  13. fields {
  14. # user=%{ldap:uid}
  15. # password=%{ldap:userPassword}
  16. # userdb_home=%{ldap:homeDirectory}
  17. # userdb_uid=%{ldap:uidNumber}
  18. # userdb_gid=%{ldap:gidNumber}
  19. user=%{ldap:uniqueIdentifier}
  20. password=%{ldap:userPassword}
  21. }
  22. }
  23. # "prefetch" user database means that the passdb already provided the
  24. # needed information and there's no need to do a separate userdb lookup.
  25. # <https://doc.dovecot.org/latest/core/config/auth/databases/prefetch.html>
  26. #userdb prefetch {
  27. #}
  28. userdb ldap {
  29. filter = (&(objectClass=PostfixBookMailAccount)(|(uniqueIdentifier=%{user})(mail=%{user})))
  30. # Default fields can be used to specify defaults that LDAP may override
  31. fields {
  32. # home=/home/virtual/%{user}
  33. home=%{ldap:mailHomeDirectory}
  34. uid=%{ldap:mailUidNumber}
  35. gid=%{ldap:mailGidNumber}
  36. mail=%{ldap:mailStorageDirectory}
  37. }
  38. }
  39. # If you don't have any user-specific settings, you can avoid the userdb LDAP
  40. # lookup by using userdb static instead of userdb ldap, for example:
  41. # <https://doc.dovecot.org/latest/core/config/auth/databases/static.html>
  42. #userdb static {
  43. #fields {
  44. # uid = vmail
  45. # gid = vmail
  46. # home = /var/vmail/%{user}
  47. #}
  48. #}