# Generated by Chef

# Authentication for master users. Included from 10-auth.conf.

# By adding master=yes setting inside a passdb you make the passdb a list
# of "master users", who can log in as anyone else.
# <doc/wiki/Authentication.MasterUsers.txt>

<% if DovecotCookbook::Auth.passdb?(@auth['master']) -%>
<%=  DovecotCookbook::Conf.authdb('passwd-file', 'passdb', @auth['master']['passdb']) %>
<% else -%>
# Example master user passdb using passwd-file. You can use any passdb though.
passdb {
  driver = passwd-file
  master = yes
  args = /etc/dovecot/master-users

  # Unless you're using PAM, you probably still want the destination user to
  # be looked up from passdb that it really exists. pass=yes does that.
  pass = yes
}
<% end -%>
