aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/dovecot/templates/configs/10-mail.conf.j23
-rw-r--r--ansible/roles/dovecot/templates/configs/auth-ldap.conf.ext.j28
-rw-r--r--ansible/roles/dovecot/templates/dovecot-ldap.conf.ext.j22
3 files changed, 10 insertions, 3 deletions
diff --git a/ansible/roles/dovecot/templates/configs/10-mail.conf.j2 b/ansible/roles/dovecot/templates/configs/10-mail.conf.j2
index db165df..11a5984 100644
--- a/ansible/roles/dovecot/templates/configs/10-mail.conf.j2
+++ b/ansible/roles/dovecot/templates/configs/10-mail.conf.j2
@@ -433,6 +433,9 @@ service welcome {
executable = script /etc/dovecot/welcome.sh
user = dovecot
unix_listener welcome {
+ # Group write permissions are necessary to allow this to run for new users.
+ mode = 0660
user = vmail
+ group = vmail
}
}
diff --git a/ansible/roles/dovecot/templates/configs/auth-ldap.conf.ext.j2 b/ansible/roles/dovecot/templates/configs/auth-ldap.conf.ext.j2
index 470cf13..139777d 100644
--- a/ansible/roles/dovecot/templates/configs/auth-ldap.conf.ext.j2
+++ b/ansible/roles/dovecot/templates/configs/auth-ldap.conf.ext.j2
@@ -12,6 +12,10 @@ passdb {
}
userdb {
- driver = static
- args = uid=vmail gid=vmail home=/var/vmail/%u mail=maildir:~/mail sieve=/home/%u/sieve sieve_user_log=/var/vmail/%u/sieve.log
+ driver = prefetch
+}
+
+userdb {
+ driver = ldap
+ args = /etc/dovecot/dovecot-ldap.conf.ext
}
diff --git a/ansible/roles/dovecot/templates/dovecot-ldap.conf.ext.j2 b/ansible/roles/dovecot/templates/dovecot-ldap.conf.ext.j2
index 4555726..0bf7180 100644
--- a/ansible/roles/dovecot/templates/dovecot-ldap.conf.ext.j2
+++ b/ansible/roles/dovecot/templates/dovecot-ldap.conf.ext.j2
@@ -56,7 +56,7 @@ base = cn=users,cn=accounts,dc=box,dc=pydis,dc=wtf
#
# There are also other special fields which can be returned, see
# http://wiki2.dovecot.org/UserDatabase/ExtraFields
-user_attrs = uidNumber=uid, gidNumber=gid, uid=home=/home/%$
+user_attrs = uidNumber=uid, gidNumber=gid, mail=maildir:~/mail, homeDirectory=/var/vmail/%n, sieve=~/main.sieve sieve_user_log=~/sieve.log
# Filter for user lookup. Some variables can be used (see
# http://wiki2.dovecot.org/Variables for full list):