auth-sql.conf.ext.erb 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Authentication for SQL users. Included from auth.conf.
  2. #
  3. # <doc/wiki/AuthDatabase.SQL.txt>
  4. <% if Dovecot::Auth.has_passdb?(@auth['sql']) -%>
  5. <%= Dovecot::Conf.authdb('passdb', @auth['sql']['passdb']) %>
  6. <% else -%>
  7. passdb {
  8. driver = sql
  9. # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
  10. args = /etc/dovecot/dovecot-sql.conf.ext
  11. }
  12. <% end -%>
  13. <% if Dovecot::Auth.has_userdb?(@auth['sql']) -%>
  14. <%= Dovecot::Conf.authdb('userdb', @auth['sql']['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 = sql
  24. args = /etc/dovecot/dovecot-sql.conf.ext
  25. }
  26. # If you don't have any user-specific settings, you can avoid the user_query
  27. # by using userdb static instead of userdb sql, 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 -%>