forked from tozd/docker-postfix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalpine-38.dockerfile
More file actions
28 lines (21 loc) · 877 Bytes
/
alpine-38.dockerfile
File metadata and controls
28 lines (21 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM tozd/runit:alpine-38
EXPOSE 25/tcp 465/tcp 587/tcp
VOLUME /var/log/postfix
VOLUME /var/spool/postfix
ENV MAILNAME mail.example.com
ENV MY_NETWORKS 172.17.0.0/16 127.0.0.0/8
ENV MY_DESTINATION localhost.localdomain, localhost
ENV ROOT_ALIAS admin@example.com
# /etc/aliases should be available at postfix installation.
COPY ./etc/aliases /etc/aliases
RUN apk update && \
apk add postfix postfix-pcre rsyslog sed && \
addgroup -S syslog && \
adduser -S -G syslog syslog
# We disable IPv6 for now, IPv6 is available in Docker even if the host does not have IPv6 connectivity.
RUN postconf -e mydestination="localhost.localdomain, localhost" && \
postconf -e smtpd_banner='$myhostname ESMTP $mail_name' && \
postconf -# myhostname && \
postconf -e inet_protocols=ipv4 && \
sed -i 's/\/var\/log\/mail/\/var\/log\/postfix\/mail/' /etc/rsyslog.conf
COPY ./etc /etc