From 200c6ecc1c8cea86523348a11be4ccdb6b883db6 Mon Sep 17 00:00:00 2001 From: AKP Date: Sun, 9 Feb 2025 00:43:47 +0000 Subject: [PATCH] Remove lmdb databases if they already exist (eg. when restarting the container) --- docker-entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d3a4046..13fefa1 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -66,16 +66,20 @@ postconf -e myhostname=$POSTFIX_HOSTNAME postconf -e "relay_domains=" # Relay configuration -postconf -e relayhost=$POSTFIX_RELAY_HOST +postconf -e "relayhost=$POSTFIX_RELAY_HOST" +postconf -e "smtp_sasl_auth_enable=yes" + +rm /etc/postfix/sasl_passwd || true echo "$POSTFIX_RELAY_HOST $POSTFIX_RELAY_USER:$POSTFIX_RELAY_PASSWORD" >> /etc/postfix/sasl_passwd postmap lmdb:/etc/postfix/sasl_passwd -postconf -e "smtp_sasl_auth_enable=yes" postconf -e "smtp_sasl_password_maps=lmdb:/etc/postfix/sasl_passwd" + postconf -e "smtp_sasl_security_options=noanonymous" postconf -e "smtp_sasl_tls_security_options=noanonymous" postconf -e "smtp_tls_security_level=encrypt" # Allowed senders +rm /etc/postfix/allowed_senders || true for i in $POSTFIX_SENDER_DOMAINS; do echo -e "$i\tOK" >> /etc/postfix/allowed_senders done