Email bounce handling with postfix
This commit is contained in:
@@ -9,6 +9,8 @@ RUN apt-get update && \
|
||||
mailutils \
|
||||
gettext-base \
|
||||
netcat-openbsd \
|
||||
python3 \
|
||||
python3-pymysql \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy configs
|
||||
@@ -16,11 +18,16 @@ COPY main.cf.template /etc/postfix/main.cf.template
|
||||
COPY sasl_passwd.template /etc/postfix/sasl_passwd.template
|
||||
COPY mysql_virtual_alias_maps.cf /etc/postfix/mysql_virtual_alias_maps.cf.template
|
||||
COPY sender_access /etc/postfix/sender_access
|
||||
COPY smtp_generic /etc/postfix/smtp_generic
|
||||
COPY aliases /etc/aliases
|
||||
COPY process-bounce.py /usr/local/bin/process-bounce.py
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh /usr/local/bin/process-bounce.py
|
||||
|
||||
# Generate Postfix maps for sender access
|
||||
RUN postmap /etc/postfix/sender_access
|
||||
# Generate Postfix maps for sender access, sender canonical, and aliases
|
||||
RUN postmap /etc/postfix/sender_access && \
|
||||
postmap /etc/postfix/smtp_generic && \
|
||||
newaliases
|
||||
|
||||
# Expose SMTP
|
||||
EXPOSE 25
|
||||
|
||||
Reference in New Issue
Block a user