diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index e4fbf16f..13195a19 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -38,7 +38,26 @@ apt_install \ # would be 20 users). Set it to 250 times the number of cores this # machine has, so on a two-core machine that's 500 processes/100 users). tools/editconf.py /etc/dovecot/conf.d/10-master.conf \ - default_process_limit=$(echo "`nproc` * 250" | bc) + default_process_limit=$(echo "`nproc` * 250" | bc) \ + log_path = /var/log/dovecot.log + +# Add logrotate entry for dovecot +cat > /etc/dovecot/conf.d/90-plugin-fts.conf << EOF; +/var/log/dovecot*.log { + missingok + notifempty + delaycompress + sharedscripts + postrotate + doveadm log reopen + endscript +} +EOF + +# Create base log files and set permissions +touch /var/log/dovecot.log +chown syslog:adm /var/log/dovecot.log +chmod 640 /var/log/dovecot.log # The inotify `max_user_instances` default is 128, which constrains # the total number of watched (IMAP IDLE push) folders by open connections.