parsimony/e2e/postfix/Dockerfile
tgiachi 9992a50ab9 test(e2e): run the whole path through a real Postfix in Docker
- Add a Postfix test image: relay domain handed to parsimony over LMTP, members in maildirs, unknown users rejected with 5.1.1
- Check list headers, VERP return path and per-recipient unsubscribe links on real delivered mail
- Check a real 5.1.1 disabling a member after three hard bounces, and a real LMTP 550 for non-members
- Check join and leave by email, moderation, the public archive and one-click unsubscribe
- Add make e2e behind the e2e build tag
2026-11-09 16:46:55 +01:00

20 lines
947 B
Docker

# A small Postfix used only by the end-to-end test.
FROM debian:stable-slim
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postfix rsyslog \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -g 5000 vmail && useradd -u 5000 -g 5000 -d /var/mail/vhosts -s /usr/sbin/nologin vmail \
&& mkdir -p /var/mail/vhosts && chown vmail:vmail /var/mail/vhosts
COPY main.cf.append /tmp/main.cf.append
COPY transport vmailbox /etc/postfix/
COPY rsyslog.conf /etc/rsyslog.conf
COPY entrypoint.sh /entrypoint.sh
RUN cat /tmp/main.cf.append >> /etc/postfix/main.cf \
# no chroot: the smtp and lmtp clients must resolve docker network names
&& postconf -F '*/*/chroot=n' \
&& chmod 644 /etc/postfix/transport /etc/postfix/vmailbox \
&& chmod +x /entrypoint.sh \
&& postmap /etc/postfix/transport /etc/postfix/vmailbox
EXPOSE 25
# Postfix logs to syslog; the test reads /var/log/mail.log
CMD ["/entrypoint.sh"]