auth-ldap.conf.ext.erb 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Authentication for LDAP users. Included from auth.conf.
  2. #
  3. # <doc/wiki/AuthDatabase.LDAP.txt>
  4. <% if Dovecot::Auth.has_passdb?(@auth['ldap']) -%>
  5. <%= Dovecot::Conf.authdb('ldap', 'passdb', @auth['ldap']['passdb']) %>
  6. <% else -%>
  7. passdb {
  8. driver = ldap
  9. # Path for LDAP configuration file, see example-config/dovecot-ldap.conf.ext
  10. args = /etc/dovecot/dovecot-ldap.conf.ext
  11. }
  12. <% end -%>
  13. <% if Dovecot::Auth.has_userdb?(@auth['ldap']) -%>
  14. <%= Dovecot::Conf.authdb('ldap', 'userdb', @auth['ldap']['userdb']) %>
  15. <% else -%>
  16. # "prefetch" user database means that the passdb already provided the
  17. # needed information and there's no need to do a separate userdb lookup.
  18. # <doc/wiki/UserDatabase.Prefetch.txt>
  19. #userdb {
  20. # driver = prefetch
  21. #}
  22. userdb {
  23. driver = ldap
  24. args = /etc/dovecot/dovecot-ldap.conf.ext
  25. }
  26. # If you don't have any user-specific settings, you can avoid the userdb LDAP
  27. # lookup by using userdb static instead of userdb ldap, for example:
  28. # <doc/wiki/UserDatabase.Static.txt>
  29. #userdb {
  30. #driver = static
  31. #args = uid=vmail gid=vmail home=/var/vmail/%u
  32. #}
  33. <% end -%>