mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
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:
parent
25ac07cae7
commit
c2881024c7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue