From 0e9c9889ff46532caab6f79476d541db2cb871f4 Mon Sep 17 00:00:00 2001 From: Andrew Low Date: Wed, 11 Aug 2021 05:31:00 -0400 Subject: [PATCH] Add logwatch maillog.conf file to support /var/log/mail/ (#2112) * Add logwatch maillog.conf file to support /var/log/mail/ * Simpliied after reviewing logwatch doc Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> --- Dockerfile | 6 ++++++ target/logwatch/maillog.conf | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 target/logwatch/maillog.conf diff --git a/Dockerfile b/Dockerfile index cc839ba1..12f1a0bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -269,6 +269,12 @@ RUN \ # prevent email when /sbin/init or init system is not existing sed -i -e 's|invoke-rc.d rsyslog rotate > /dev/null|/usr/bin/supervisorctl signal hup rsyslog >/dev/null|g' /usr/lib/rsyslog/rsyslog-rotate +# ----------------------------------------------- +# --- Logwatch ---------------------------------- +# ----------------------------------------------- + +COPY target/logwatch/maillog.conf /etc/logwatch/conf/logfiles/maillog.conf + # ----------------------------------------------- # --- Supervisord & Start ----------------------- # ----------------------------------------------- diff --git a/target/logwatch/maillog.conf b/target/logwatch/maillog.conf new file mode 100644 index 00000000..51a73c53 --- /dev/null +++ b/target/logwatch/maillog.conf @@ -0,0 +1,10 @@ +# +# Extensions for docker-mailserver /var/log/mail/. log path +# + +# Mail log files +LogFile = mail/mail.log +LogFile = mail/mail.log.1 + +# Support Archives +Archive = mail/mail.log.*.gz