Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

155 lines
5.6KB

  1. # This file is commonly accessed via passdb {} or userdb {} section in
  2. # conf.d/auth-ldap.conf.ext
  3. # This file is opened as root, so it should be owned by root and mode 0600.
  4. #
  5. # http://wiki2.dovecot.org/AuthDatabase/LDAP
  6. #
  7. # NOTE: If you're not using authentication binds, you'll need to give
  8. # dovecot-auth read access to userPassword field in the LDAP server.
  9. # With OpenLDAP this is done by modifying /etc/ldap/slapd.conf. There should
  10. # already be something like this:
  11. # access to attribute=userPassword
  12. # by dn="<dovecot's dn>" read # add this
  13. # by anonymous auth
  14. # by self write
  15. # by * none
  16. # Space separated list of LDAP hosts to use. host:port is allowed too.
  17. #hosts =
  18. # LDAP URIs to use. You can use this instead of hosts list. Note that this
  19. # setting isn't supported by all LDAP libraries.
  20. #uris =
  21. # Distinguished Name - the username used to login to the LDAP server.
  22. # Leave it commented out to bind anonymously (useful with auth_bind=yes).
  23. #dn =
  24. # Password for LDAP server, if dn is specified.
  25. #dnpass =
  26. # Use SASL binding instead of the simple binding. Note that this changes
  27. # ldap_version automatically to be 3 if it's lower. Also note that SASL binds
  28. # and auth_bind=yes don't work together.
  29. #sasl_bind = no
  30. # SASL mechanism name to use.
  31. #sasl_mech =
  32. # SASL realm to use.
  33. #sasl_realm =
  34. # SASL authorization ID, ie. the dnpass is for this "master user", but the
  35. # dn is still the logged in user. Normally you want to keep this empty.
  36. #sasl_authz_id =
  37. # Use TLS to connect to the LDAP server.
  38. #tls = no
  39. # TLS options, currently supported only with OpenLDAP:
  40. #tls_ca_cert_file =
  41. #tls_ca_cert_dir =
  42. #tls_cipher_suite =
  43. # TLS cert/key is used only if LDAP server requires a client certificate.
  44. #tls_cert_file =
  45. #tls_key_file =
  46. # Valid values: never, hard, demand, allow, try
  47. #tls_require_cert =
  48. # Use the given ldaprc path.
  49. #ldaprc_path =
  50. # LDAP library debug level as specified by LDAP_DEBUG_* in ldap_log.h.
  51. # -1 = everything. You may need to recompile OpenLDAP with debugging enabled
  52. # to get enough output.
  53. #debug_level = 0
  54. # Use authentication binding for verifying password's validity. This works by
  55. # logging into LDAP server using the username and password given by client.
  56. # The pass_filter is used to find the DN for the user. Note that the pass_attrs
  57. # is still used, only the password field is ignored in it. Before doing any
  58. # search, the binding is switched back to the default DN.
  59. #auth_bind = no
  60. # If authentication binding is used, you can save one LDAP request per login
  61. # if users' DN can be specified with a common template. The template can use
  62. # the standard %variables (see user_filter). Note that you can't
  63. # use any pass_attrs if you use this setting.
  64. #
  65. # If you use this setting, it's a good idea to use a different
  66. # dovecot-ldap.conf.ext for userdb (it can even be a symlink, just as long as
  67. # the filename is different in userdb's args). That way one connection is used
  68. # only for LDAP binds and another connection is used for user lookups.
  69. # Otherwise the binding is changed to the default DN before each user lookup.
  70. #
  71. # For example:
  72. # auth_bind_userdn = cn=%u,ou=people,o=org
  73. #
  74. #auth_bind_userdn =
  75. # LDAP protocol version to use. Likely 2 or 3.
  76. #ldap_version = 3
  77. # LDAP base. %variables can be used here.
  78. # For example: dc=mail, dc=example, dc=org
  79. base =
  80. # Dereference: never, searching, finding, always
  81. #deref = never
  82. # Search scope: base, onelevel, subtree
  83. #scope = subtree
  84. # User attributes are given in LDAP-name=dovecot-internal-name list. The
  85. # internal names are:
  86. # uid - System UID
  87. # gid - System GID
  88. # home - Home directory
  89. # mail - Mail location
  90. #
  91. # There are also other special fields which can be returned, see
  92. # http://wiki2.dovecot.org/UserDatabase/ExtraFields
  93. #user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
  94. # Filter for user lookup. Some variables can be used (see
  95. # http://wiki2.dovecot.org/Variables for full list):
  96. # %u - username
  97. # %n - user part in user@domain, same as %u if there's no domain
  98. # %d - domain part in user@domain, empty if user there's no domain
  99. #user_filter = (&(objectClass=posixAccount)(uid=%u))
  100. # Password checking attributes:
  101. # user: Virtual user name (user@domain), if you wish to change the
  102. # user-given username to something else
  103. # password: Password, may optionally start with {type}, eg. {crypt}
  104. # There are also other special fields which can be returned, see
  105. # http://wiki2.dovecot.org/PasswordDatabase/ExtraFields
  106. #pass_attrs = uid=user,userPassword=password
  107. # If you wish to avoid two LDAP lookups (passdb + userdb), you can use
  108. # userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll
  109. # also have to include user_attrs in pass_attrs field prefixed with "userdb_"
  110. # string. For example:
  111. #pass_attrs = uid=user,userPassword=password,\
  112. # homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid
  113. # Filter for password lookups
  114. #pass_filter = (&(objectClass=posixAccount)(uid=%u))
  115. # Attributes and filter to get a list of all users
  116. #iterate_attrs = uid=user
  117. #iterate_filter = (objectClass=posixAccount)
  118. # Default password scheme. "{scheme}" before password overrides this.
  119. # List of supported schemes is in: http://wiki2.dovecot.org/Authentication
  120. #default_pass_scheme = CRYPT
  121. hosts = ${LDAP_SERVER_HOST}
  122. dn = ${LDAP_BIND_DN}
  123. dnpass = ${LDAP_BIND_PWD}
  124. ldap_version = 3
  125. base = ${LDAP_SEARCH_BASE}
  126. user_attrs = mailHomeDirectory=home,mailUidNumber=uid,mailGidNumber=gid,mailStorageDirectory=mail
  127. user_filter = (&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))
  128. pass_attrs = uniqueIdentifier=user,userPassword=password
  129. pass_filter = (&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))
  130. default_pass_scheme = CRYPT