From d05a02e0b64499c1c4d551c298af780b4a0cc1b9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 21 Feb 2019 14:58:13 +0200 Subject: [PATCH] hotfix for dovecot namespace on ubuntu 18.04 --- .../ubuntu/18.04/dovecot/conf.d/10-mail.conf | 5 +++++ install/ubuntu/18.04/dovecot/dovecot.conf | 20 ------------------- install/vst-install-ubuntu.sh | 13 +++++++++++- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/install/ubuntu/18.04/dovecot/conf.d/10-mail.conf b/install/ubuntu/18.04/dovecot/conf.d/10-mail.conf index 55313419e..7a20878ae 100644 --- a/install/ubuntu/18.04/dovecot/conf.d/10-mail.conf +++ b/install/ubuntu/18.04/dovecot/conf.d/10-mail.conf @@ -2,3 +2,8 @@ mail_privileged_group = mail mail_access_groups = mail mail_location = maildir:%h/mail/%d/%n pop3_uidl_format = %08Xu%08Xv +namespace inbox { + inbox = yes +} +first_valid_uid = 1000 +mbox_write_locks = fcntl diff --git a/install/ubuntu/18.04/dovecot/dovecot.conf b/install/ubuntu/18.04/dovecot/dovecot.conf index 163460bab..0a8553510 100644 --- a/install/ubuntu/18.04/dovecot/dovecot.conf +++ b/install/ubuntu/18.04/dovecot/dovecot.conf @@ -2,23 +2,3 @@ protocols = imap pop3 listen = *, :: base_dir = /var/run/dovecot/ !include conf.d/*.conf - -namespace inbox { - type = private - separator = / - prefix = - inbox = yes - - mailbox Sent { - auto = subscribe - special_use = \Sent - } - mailbox Drafts { - auto = subscribe - special_use = \Drafts - } - mailbox Trash { - auto = subscribe - special_use = \Trash - } -} diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index effa0dcd0..7fe4003e8 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -1087,7 +1087,18 @@ fi if [ "$dovecot" = 'yes' ]; then gpasswd -a dovecot mail - cp -rf $vestacp/dovecot /etc/ + if [[ ${release:0:2} -ge 18 ]]; then + cp -r /usr/local/vesta/install/debian/9/dovecot /etc/ + if [ -z "$(grep yes /etc/dovecot/conf.d/10-mail.conf)" ]; then + echo "namespace inbox {" >> /etc/dovecot/conf.d/10-mail.conf + echo " inbox = yes" >> /etc/dovecot/conf.d/10-mail.conf + echo "}" >> /etc/dovecot/conf.d/10-mail.conf + echo "first_valid_uid = 1000" >> /etc/dovecot/conf.d/10-mail.conf + echo "mbox_write_locks = fcntl" >> /etc/dovecot/conf.d/10-mail.conf + fi + else + cp -rf $vestacp/dovecot /etc/ + fi cp -f $vestacp/logrotate/dovecot /etc/logrotate.d/ chown -R root:root /etc/dovecot* update-rc.d dovecot defaults