auth-ldap.conf.ext.erb 1.1 KB

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