dovecot: make maildir not the same as homedir
authorRalf Jung <post@ralfj.de>
Mon, 3 Jun 2019 17:45:18 +0000 (19:45 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 3 Jun 2019 17:45:18 +0000 (19:45 +0200)
roles/email/templates/dovecot/conf.d/10-mail.conf
roles/email/templates/dovecot/dovecot-sql.conf.ext

index d9f97afd80f617fcc4eb5fd1a0233eaae03cddf0..db650c661b0e21be9a7c695f3bc37e957c397100 100644 (file)
@@ -27,7 +27,7 @@
 #
 # <doc/wiki/MailLocation.txt>
 #
 #
 # <doc/wiki/MailLocation.txt>
 #
-mail_location = maildir:/var/vmail/%u
+mail_location = maildir:~/mail
 
 # If you need to set multiple mailbox locations or want to change default
 # namespace settings, you can do it by defining namespace sections.
 
 # If you need to set multiple mailbox locations or want to change default
 # namespace settings, you can do it by defining namespace sections.
index 1aca7d9915733709b01051a911098bb6ce70db54..bbd9378b56f389a13d8645fc9b23be3fac792afa 100644 (file)
@@ -127,7 +127,7 @@ default_pass_scheme = SSHA
 #user_query = \
 #  SELECT home, uid, gid \
 #  FROM users WHERE username = '%n' AND domain = '%d'
 #user_query = \
 #  SELECT home, uid, gid \
 #  FROM users WHERE username = '%n' AND domain = '%d'
-user_query = SELECT '/var/vmail/%u' as home, 'maildir:/var/vmail/%u' as mail, {{postfix.dovecot.vmail_uid}} AS uid, {{postfix.dovecot.mail_gid}} AS gid FROM users WHERE username = '%u' AND active = '1'
+user_query = SELECT '/var/vmail/%u' as home, 'maildir:~/mail' as mail, {{postfix.dovecot.vmail_uid}} AS uid, {{postfix.dovecot.mail_gid}} AS gid FROM users WHERE username = '%u' AND active = '1'
 
 # If you wish to avoid two SQL lookups (passdb + userdb), you can use
 # userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
 
 # If you wish to avoid two SQL lookups (passdb + userdb), you can use
 # userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
@@ -137,7 +137,7 @@ user_query = SELECT '/var/vmail/%u' as home, 'maildir:/var/vmail/%u' as mail, {{
 #  SELECT userid AS user, password, \
 #    home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
 #  FROM users WHERE userid = '%u'
 #  SELECT userid AS user, password, \
 #    home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
 #  FROM users WHERE userid = '%u'
-password_query = SELECT username as user, password, '/var/vmail/%u' as userdb_home, 'maildir:/var/vmail/%u' as userdb_mail, {{postfix.dovecot.vmail_uid}} as userdb_uid, {{postfix.dovecot.mail_gid}} as userdb_gid \
+password_query = SELECT username as user, password, '/var/vmail/%u' as userdb_home, 'maildir:~/mail' as userdb_mail, {{postfix.dovecot.vmail_uid}} as userdb_uid, {{postfix.dovecot.mail_gid}} as userdb_gid \
     FROM users WHERE username = '%u' AND active = '1'
 
 # Query to get a list of all usernames.
     FROM users WHERE username = '%u' AND active = '1'
 
 # Query to get a list of all usernames.