48 lines
1.1 KiB
Cheetah
48 lines
1.1 KiB
Cheetah
auth_realms = {{ getv "/mail/domains" }}
|
|
auth_default_realm = {{ index (split (index (split (getv "/mail/domains") " ") 0) ",") 0 }}
|
|
auth_username_format = {{ getv "/auth/username/format" }}
|
|
auth_mechanisms = {{ getv "/auth/mechanisms" }}
|
|
|
|
|
|
{{ if eq (getv "/auth/master/enable") "yes"}}
|
|
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 }}
|
|
|
|
|
|
{{ if eq (getv "/ldap/enable" "") "yes"}}
|
|
passdb {
|
|
driver = ldap
|
|
args = /etc/dovecot/local.d/ldap.conf.ext
|
|
}
|
|
userdb {
|
|
driver = prefetch
|
|
}
|
|
userdb {
|
|
driver = ldap
|
|
args = /etc/dovecot/local.d/ldap2.conf.ext
|
|
}
|
|
{{ end }}
|
|
{{ if eq (getv "/single/user" "") "yes" }}
|
|
userdb {
|
|
driver = static
|
|
args = uid=5000 gid=5000 home=/vmail/mail/single
|
|
}
|
|
passdb {
|
|
driver = static
|
|
{{ if eq (getv "/single/user/auth" "") "any" }}
|
|
args = nopassword=y
|
|
{{ else }}
|
|
args = password=
|
|
{{ end }}
|
|
default_fields = userdb_home=/vmail/mail/single userdb_uid=5000 userdb_gid=5000
|
|
}
|
|
{{ end }}
|