# Generated by Chef

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

<% if DovecotCookbook::Auth.passdb?(@auth['vpopmail']) -%>
<%=  DovecotCookbook::Conf.authdb('vpopmail', 'passdb', @auth['vpopmail']['passdb']) %>
<% else -%>
passdb {
  driver = vpopmail

  # [cache_key=<key>] [webmail=<ip>]
  args =
}
<% end -%>

<% if DovecotCookbook::Auth.userdb?(@auth['vpopmail']) -%>
<%=  DovecotCookbook::Conf.authdb('vpopmail', 'userdb', @auth['vpopmail']['userdb']) %>
<% else -%>
userdb {
  driver = vpopmail

  # [quota_template=<template>] - %q expands to Maildir++ quota
  args = quota_template=quota_rule=*:backend=%q
}
<% end -%>
