From c2eb975ace3781fbe68de3cf716dfce6ca3be33a Mon Sep 17 00:00:00 2001 From: Thomas VIAL Date: Fri, 23 Sep 2016 08:22:57 +0200 Subject: [PATCH] Fixes #329 (#330) --- Dockerfile | 1 + test/tests.bats | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index a410bedd..37a24ecd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -93,6 +93,7 @@ RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \ touch /var/log/mail/clamav.log && chown -R clamav:root /var/log/mail/clamav.log && \ touch /var/log/mail/freshclam.log && chown -R clamav:root /var/log/mail/freshclam.log && \ sed -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/rsyslog.d/50-default.conf && \ + sed -i -r 's|;auth,authpriv.none|;mail.none;mail.error;auth,authpriv.none|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 && \ diff --git a/test/tests.bats b/test/tests.bats index fc9352b6..c9989ea5 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -572,6 +572,11 @@ [ "$output" = "my-domain.com" ] } +@test "checking system: postfix should not log to syslog" { + run docker exec mail grep 'postfix' /var/log/syslog + [ "$status" -eq 1 ] +} + # # sieve #