From 7e51f789f4bad8b16e5c10e8efdc31c38513fca2 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 7 Jan 2023 18:27:09 -0300 Subject: [PATCH] feat: make srs configurable --- Dockerfile | 2 -- postfixd.sh | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 373900c..758002d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,9 +68,7 @@ RUN postconf -e non_smtpd_milters=inet:opendkim:8891 RUN postconf -e milter_default_action=accept RUN postconf -e milter_protocol=6 RUN postconf -e virtual_alias_maps=lmdb:/etc/postfix/maps/virtual -RUN postconf -e sender_canonical_maps=tcp:postsrsd:10001 RUN postconf -e sender_canonical_classes=envelope_sender -RUN postconf -e recipient_canonical_maps=tcp:postsrsd:10002 RUN postconf -e recipient_canonical_classes=envelope_recipient,header_recipient RUN postconf -e smtpd_client_connection_rate_limit=10 diff --git a/postfixd.sh b/postfixd.sh index 93026e3..bb653cb 100755 --- a/postfixd.sh +++ b/postfixd.sh @@ -13,6 +13,11 @@ case $1 in postconf -e non_smtpd_milters="${MILTERS}" fi + if test -n "${SRS}"; then + postconf -e sender_canonical_maps=tcp:${SRS}:10001 + postconf -e recipient_canonical_maps=tcp:${SRS}:10002 + fi + test -n "${NETWORKS}" && postconf -e mynetworks="${NETWORKS}" ;;