Dockerfile 786 B

12345678910111213141516171819202122
  1. FROM alpine:3.15.0
  2. ARG POSTFIX_PACKAGE_VERSION=3.6.3-r1
  3. # http://www.postfix.org/postconf.5.html#tls_append_default_CA
  4. # https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/
  5. ARG MOZILLA_CA_CERT_STORE_PACKAGE_VERSION=20191127-r7
  6. RUN apk add --no-cache \
  7. ca-certificates=$MOZILLA_CA_CERT_STORE_PACKAGE_VERSION \
  8. postfix=$POSTFIX_PACKAGE_VERSION \
  9. && postconf -evv tls_append_default_CA=no `# default, but better be safe`
  10. # http://www.postfix.org/MAILLOG_README.html
  11. RUN postconf -F | grep -E '^postlog/unix-dgram/service = postlog$' \
  12. && postconf -evv maillog_file=/dev/stdout \
  13. && postfix check
  14. # http://www.postfix.org/postconf.5.html#queue_directory
  15. VOLUME /var/spool/postfix
  16. EXPOSE 25/tcp
  17. COPY postfix.sh /
  18. CMD ["/postfix.sh"]