Build Postfix aliases database

This commit is contained in:
Disassembler 2018-02-03 10:48:17 +01:00
parent 0fdd906bc8
commit dfd405e444
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -7,6 +7,8 @@ RUN \
&& adduser -S -u 587 -h /var/spool/postfix -s /bin/false -g postfix -G postfix postfix \ && adduser -S -u 587 -h /var/spool/postfix -s /bin/false -g postfix -G postfix postfix \
# Install Postfix # Install Postfix
&& apk --no-cache add ca-certificates postfix s6 \ && apk --no-cache add ca-certificates postfix s6 \
# Build aliases database
&& newaliases \
# Cleanup # Cleanup
&& sed -ir '/^(#.*)?$/d' /etc/postfix/aliases \ && sed -ir '/^(#.*)?$/d' /etc/postfix/aliases \
&& rm -r /etc/postfix/access /etc/postfix/canonical /etc/postfix/dynamicmaps.cf* /etc/postfix/generic /etc/postfix/header_checks /etc/postfix/postfix-files.d /etc/postfix/relocated /etc/postfix/transport /etc/postfix/virtual && rm -r /etc/postfix/access /etc/postfix/canonical /etc/postfix/dynamicmaps.cf* /etc/postfix/generic /etc/postfix/header_checks /etc/postfix/postfix-files.d /etc/postfix/relocated /etc/postfix/transport /etc/postfix/virtual