dovecot-ldap.conf.ext.erb 5.1 KB

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