Postfix relay image with Cyrus SASL (sasldb2) authentication. Replaces mwader/postfix-relay with a controlled image built via Kaniko and stored in Harbor. Credentials injected from Vault ExternalSecret at startup.
23 lines
569 B
Docker
23 lines
569 B
Docker
FROM debian:12-slim
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
postfix \
|
|
ca-certificates \
|
|
sasl2-bin \
|
|
libsasl2-modules \
|
|
netcat-openbsd \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& (getent group postdrop || groupadd -r postdrop) \
|
|
&& usermod -aG postdrop postfix
|
|
|
|
COPY main.cf /etc/postfix/main.cf
|
|
COPY master.cf /etc/postfix/master.cf
|
|
COPY smtpd.conf /etc/postfix/sasl/smtpd.conf
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 25 587
|
|
ENTRYPOINT ["/entrypoint.sh"]
|