1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-25 07:47:05 +00:00
mailinabox/setup/additionals.sh

28 lines
857 B
Bash
Raw Normal View History

2021-04-11 10:14:41 +00:00
source /etc/mailinabox.conf
source setup/functions.sh
2021-04-21 20:42:10 +00:00
# Add additional packages
apt_install pflogsumm
2021-04-11 10:14:41 +00:00
# Cleanup old spam and trash email
hide_output install -m 755 conf/cron/miab_clean_mail /etc/cron.weekly/
2021-04-11 10:14:41 +00:00
# Reduce logs by not logging mail output in syslog
sed -i "s/\*\.\*;auth,authpriv.none.*\-\/var\/log\/syslog/\*\.\*;mail,auth,authpriv.none \-\/var\/log\/syslog/g" /etc/rsyslog.d/50-default.conf
# Reduce logs by only logging ufw in ufw.log
sed -i "s/#\& stop/\& stop/g" /etc/rsyslog.d/20-ufw.conf
restart_service rsyslog
# decrease time journal is stored
tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=2month
tools/editconf.py /etc/systemd/journald.conf MaxFileSec=1week
hide_output systemctl restart systemd-journald.service
2021-04-26 19:46:07 +00:00
# Create forward for root emails
cat > /root/.forward << EOF;
administrator@$PRIMARY_HOSTNAME
2021-04-28 07:23:27 +00:00
EOF