# Generated by Chef

# Authentication for checkpassword users. Included from 10-auth.conf.
#
# <doc/wiki/AuthDatabase.CheckPassword.txt>

<% if DovecotCookbook::Auth.passdb?(@auth['checkpassword']) -%>
<%=  DovecotCookbook::Conf.authdb('checkpassword', 'passdb', @auth['checkpassword']['passdb']) %>
<% else -%>
passdb {
  driver = checkpassword
  args = /usr/bin/checkpassword
}
<% end -%>

<% if DovecotCookbook::Auth.userdb?(@auth['checkpassword']) -%>
<%=  DovecotCookbook::Conf.authdb('checkpassword', 'userdb', @auth['checkpassword']['userdb']) %>
<% else -%>
# passdb lookup should return also userdb info
userdb {
  driver = prefetch
}
<% end -%>

# Standard checkpassword doesn't support direct userdb lookups.
# If you need checkpassword userdb, the checkpassword must support
# Dovecot-specific extensions.
#userdb {
#  driver = checkpassword
#  args = /usr/bin/checkpassword
#}
