mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-24 02:37:05 +00:00
Configured dovecot to log to a dedicated file
This commit is contained in:
parent
eed360d3e6
commit
9eb7e058be
@ -38,7 +38,30 @@ apt_install \
|
|||||||
# would be 20 users). Set it to 250 times the number of cores this
|
# 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).
|
# machine has, so on a two-core machine that's 500 processes/100 users).
|
||||||
tools/editconf.py /etc/dovecot/conf.d/10-master.conf \
|
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
|
||||||
|
|
||||||
|
# Set the log file for dovecot to it's own to avoid loading up
|
||||||
|
# syslog with excessive log events
|
||||||
|
tools/editconf.py /etc/dovecot/conf.d/10-master.conf \
|
||||||
|
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
|
||||||
|
|
||||||
|
# set ownership and permissions for dovecot log file
|
||||||
|
chown syslog:adm /var/log/dovecot.log
|
||||||
|
chmod 640 /var/log/dovecot.log
|
||||||
|
|
||||||
# The inotify `max_user_instances` default is 128, which constrains
|
# The inotify `max_user_instances` default is 128, which constrains
|
||||||
# the total number of watched (IMAP IDLE push) folders by open connections.
|
# the total number of watched (IMAP IDLE push) folders by open connections.
|
||||||
|
Loading…
Reference in New Issue
Block a user