From bc95107b54b7df9a5f422b7a6cdcd366ddef410b Mon Sep 17 00:00:00 2001 From: Jarrod Smith Date: Wed, 9 Dec 2020 20:02:27 +0000 Subject: [PATCH 1/3] Get rid of syslogd warning about kernel logging. --- Dockerfile | 3 +++ README.md | 2 ++ target/postfix/main.cf | 2 ++ 3 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 926c5a7b..6daa41f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -220,6 +220,9 @@ RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \ # prevent syslog logrotate warnings \ sed -i -e 's/\(printerror "could not determine current runlevel"\)/#\1/' /usr/sbin/invoke-rc.d && \ sed -i -e 's/^\(POLICYHELPER=\).*/\1/' /usr/sbin/invoke-rc.d && \ + # Prevent syslog warning about imklog permissions. + # We won't want to look at that inside a container anyway. + sed -i -e 's/^module\(load="imklog"\)/#module\(load="imklog"\)/' /etc/rsyslog.conf && \ # 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 diff --git a/README.md b/README.md index 75677aef..15c6a7f5 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ chmod a+x ./setup.sh docker-compose up -d mail ./setup.sh email add [] +./setup.sh alias add postmaster@ ./setup.sh config dkim ``` @@ -131,6 +132,7 @@ Edit the files `.env` and `docker-compose.yml`. In `.env` uncomment the variable docker-compose up -d mail ./setup.sh -Z email add [] +./setup.sh -Z alias add postmaster@ ./setup.sh -Z config dkim ``` diff --git a/target/postfix/main.cf b/target/postfix/main.cf index 99be7f15..c6dfe215 100644 --- a/target/postfix/main.cf +++ b/target/postfix/main.cf @@ -10,6 +10,8 @@ readme_directory = no alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localhost.$mydomain, localhost +# Uncomment for container accounts to masquerade as the domain instead of the host +# myorigin = $mydomain relayhost = mynetworks = 127.0.0.0/8 [::1]/128 [fe80::]/64 mailbox_size_limit = 0 From fd9b9ebf1e9f6213b24d8cf392e07815402b36eb Mon Sep 17 00:00:00 2001 From: Jarrod Smith Date: Wed, 9 Dec 2020 20:42:21 +0000 Subject: [PATCH 2/3] Comment out errant/noisy kernel logging in /etc/rsyslogd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6daa41f3..f9359f8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,7 +222,7 @@ RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \ sed -i -e 's/^\(POLICYHELPER=\).*/\1/' /usr/sbin/invoke-rc.d && \ # Prevent syslog warning about imklog permissions. # We won't want to look at that inside a container anyway. - sed -i -e 's/^module\(load="imklog"\)/#module\(load="imklog"\)/' /etc/rsyslog.conf && \ + sed -i -e 's/^module(load=\"imklog\")/#module(load=\"imklog\")/' /etc/rsyslog.conf && \ # 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 From 6292e8ac020d0ce7b9d48952d0eb054e41c1d9e1 Mon Sep 17 00:00:00 2001 From: Jarrod Smith Date: Thu, 10 Dec 2020 17:19:19 +0000 Subject: [PATCH 3/3] This should be a config option instead. --- target/postfix/main.cf | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/postfix/main.cf b/target/postfix/main.cf index c6dfe215..99be7f15 100644 --- a/target/postfix/main.cf +++ b/target/postfix/main.cf @@ -10,8 +10,6 @@ readme_directory = no alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localhost.$mydomain, localhost -# Uncomment for container accounts to masquerade as the domain instead of the host -# myorigin = $mydomain relayhost = mynetworks = 127.0.0.0/8 [::1]/128 [fe80::]/64 mailbox_size_limit = 0