fixed logging in spampd and postfix

This commit is contained in:
andreas
2023-10-26 20:55:23 +00:00
parent 991905dd4f
commit f808ebae4a
13 changed files with 168 additions and 29 deletions

View File

@@ -4,15 +4,24 @@ FROM ubuntu:20.04
ENV TZ Europe/Berlin
RUN <<EOF
apt-get update
apt-get install -y postfix bind9-dnsutils
apt-get install -y postfix bind9-dnsutils
apt-get install -y rsyslog
# cleanup
apt-get autoclean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
EOF
COPY etc/postfix/ /etc/postfix/
COPY etc/ssl/ /etc/ssl/
# https://github.com/moby/moby/issues/31243#issuecomment-406879017
RUN <<EOF
sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
sed -i 's|-/var/log/syslog|/dev/stdout|' /etc/rsyslog.d/50-default.conf
usermod -G tty syslog
# chown -R postfix /var/spool/postfix
EOF
COPY --chmod=0775 entrypoint.sh /entrypoint.sh
EXPOSE 25
EXPOSE 10026
VOLUME /var/spool/postfix
ENTRYPOINT ["/entrypoint.sh"]
CMD ["postfix", "start-fg"]