hotfix for dovecot namespace on ubuntu 18.04

This commit is contained in:
Serghey Rodin 2019-02-21 14:58:13 +02:00
commit d05a02e0b6
3 changed files with 17 additions and 21 deletions

View file

@ -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

View file

@ -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
}
}

View file

@ -1087,7 +1087,18 @@ fi
if [ "$dovecot" = 'yes' ]; then
gpasswd -a dovecot mail
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