18 lines
520 B
Docker
18 lines
520 B
Docker
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y postfix mailutils
|
|
|
|
COPY ../share/users.txt /tmp/users.txt
|
|
COPY ../share/postfix.sh /tmp/postfix.sh
|
|
COPY postfix/main.cf /etc/postfix/main.cf
|
|
COPY postfix/entrypoint.sh /entrypoint.sh
|
|
|
|
RUN chmod 644 /etc/postfix/main.cf && \
|
|
chmod +x /tmp/postfix.sh /entrypoint.sh && \
|
|
/tmp/postfix.sh > /etc/postfix/virtual_mailbox && \
|
|
postmap /etc/postfix/virtual_mailbox && \
|
|
rm /tmp/users.txt /tmp/postfix.sh
|
|
|
|
EXPOSE 25 587
|
|
|
|
CMD ["/entrypoint.sh"]
|