Clamav, Imap, Pop3, Dovecot, Postfix services are now logging into

/var/log/mail directory.
Fail2ban jails and logrotate config files have been updated accordingly.
Integration tests have been extended to include a check of the new path.
This commit is contained in:
angus 2016-04-08 00:23:12 +02:00
parent 25ac07cae7
commit c2881024c7
2 changed files with 13 additions and 0 deletions

View File

@ -259,6 +259,9 @@ touch /var/log/mail/freshclam.log && chown -R clamav:root /var/log/mail/freshcl
sed -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/rsyslog.d/50-default.conf
sed -i -r 's|LogFile /var/log/clamav/|LogFile /var/log/mail/|g' /etc/clamav/clamd.conf
sed -i -r 's|UpdateLogFile /var/log/clamav/|UpdateLogFile /var/log/mail/|g' /etc/clamav/freshclam.conf
sed -i -r 's|/var/log/clamav|/var/log/mail|g' /etc/logrotate.d/clamav-daemon
sed -i -r 's|/var/log/clamav|/var/log/mail|g' /etc/logrotate.d/clamav-freshclam
sed -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/logrotate.d/rsyslog
echo "Starting daemons"
cron

View File

@ -115,6 +115,16 @@
[ "$status" -eq 0 ]
}
#
# logs
#
@test "checking logs: mail related logs should be located in a subdirectory" {
run docker exec mail /bin/sh -c "ls -1 /var/log/mail/ | grep -E 'clamav|freshclam|mail'|wc -l"
[ "$status" -eq 0 ]
[ "$output" = 3 ]
}
#
# smtp
#