Compare commits
2 Commits
1
...
single-use
| Author | SHA1 | Date | |
|---|---|---|---|
| 6584780e0a | |||
| 4de1ce0dc6 |
@@ -6,5 +6,7 @@ keys = [
|
|||||||
"/auth/username/format",
|
"/auth/username/format",
|
||||||
"/auth/mechanisms",
|
"/auth/mechanisms",
|
||||||
"/auth/master/enable",
|
"/auth/master/enable",
|
||||||
"/ldap/enable"
|
"/ldap/enable",
|
||||||
|
"/single/user",
|
||||||
|
"/single/user/auth",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ passdb {
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{ if eq (getv "/ldap/enable") "yes"}}
|
{{ if eq (getv "/ldap/enable" "") "yes"}}
|
||||||
passdb {
|
passdb {
|
||||||
driver = ldap
|
driver = ldap
|
||||||
args = /etc/dovecot/local.d/ldap.conf.ext
|
args = /etc/dovecot/local.d/ldap.conf.ext
|
||||||
@@ -30,3 +30,18 @@ userdb {
|
|||||||
args = /etc/dovecot/local.d/ldap2.conf.ext
|
args = /etc/dovecot/local.d/ldap2.conf.ext
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ 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 }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ if (getv "/ldap/hosts") }}
|
{{ with getv "/ldap/hosts" }}
|
||||||
hosts = {{ getv "/ldap/hosts" }}
|
hosts = {{.}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
uris = {{ getv "/ldap/uris" }}
|
uris = {{ getv "/ldap/uris" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user