summaryrefslogtreecommitdiff
path: root/hosts/surtr/email/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/surtr/email/default.nix')
-rw-r--r--hosts/surtr/email/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/hosts/surtr/email/default.nix b/hosts/surtr/email/default.nix
index fb8573ce..e2f71c21 100644
--- a/hosts/surtr/email/default.nix
+++ b/hosts/surtr/email/default.nix
@@ -287,8 +287,9 @@ in {
287 dovecotSqlConf = pkgs.writeText "dovecot-sql.conf" '' 287 dovecotSqlConf = pkgs.writeText "dovecot-sql.conf" ''
288 driver = pgsql 288 driver = pgsql
289 connect = dbname=email 289 connect = dbname=email
290 password_query = SELECT user, quota_rule FROM imap_user WHERE user = '%u' 290 password_query = SELECT NULL as password, user as user, quota_rule FROM imap_user WHERE user = '%u'
291 user_query = SELECT user, quota_rule FROM imap_user WHERE user = '%u' 291 user_query = SELECT user, quota_rule FROM imap_user WHERE user = '%u'
292 iterate_query = SELECT user FROM imap_user
292 ''; 293 '';
293 in '' 294 in ''
294 mail_home = /var/lib/mail/%u 295 mail_home = /var/lib/mail/%u
@@ -326,6 +327,9 @@ in {
326 } 327 }
327 328
328 userdb { 329 userdb {
330 driver = prefetch
331 }
332 userdb {
329 driver = sql 333 driver = sql
330 args = ${dovecotSqlConf} 334 args = ${dovecotSqlConf}
331 default_fields = uid=dovecot2 gid=dovecot2 nopassword 335 default_fields = uid=dovecot2 gid=dovecot2 nopassword