onddo/dovecot-cookbook

View on GitHub
templates/default/conf.d/auth-static.conf.ext.erb

Summary

Maintainability
Test Coverage
# Generated by Chef

# Static passdb. Included from 10-auth.conf.

# This can be used for situations where Dovecot doesn't need to verify the
# username or the password, or if there is a single password for all users:
#
#  - proxy frontend, where the backend verifies the password
#  - proxy backend, where the frontend already verified the password
#  - authentication with SSL certificates
#  - simple testing

<% if DovecotCookbook::Auth.passdb?(@auth['static']) -%>
<%=  DovecotCookbook::Conf.authdb('static', 'passdb', @auth['static']['passdb']) %>
<% else -%>
#passdb {
#  driver = static
#  args = proxy=y host=%1Mu.example.com nopassword=y
#}

#passdb {
#  driver = static
#  args = password=test
#}
<% end -%>

<% if DovecotCookbook::Auth.userdb?(@auth['static']) -%>
<%=  DovecotCookbook::Conf.authdb('static', 'userdb', @auth['static']['userdb']) %>
<% else -%>
#userdb {
#  driver = static
#  args = uid=vmail gid=vmail home=/home/%u
#}
<% end -%>