From f4b70c83e2af75296c6d7a8415d6814635811597 Mon Sep 17 00:00:00 2001 From: "Rev (Tsuyoshi Yamasaki)" Date: Thu, 17 Dec 2020 01:18:27 +0900 Subject: [PATCH] add smtp_tls_wrappermode and smtp_tls_security_level. You need both parameters when you send emails with TLS(465). --- run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run.sh b/run.sh index a3a846d..fa4e8b9 100644 --- a/run.sh +++ b/run.sh @@ -38,6 +38,11 @@ add_config_value "smtp_sasl_password_maps" "hash:/etc/postfix/sasl_passwd" add_config_value "smtp_sasl_security_options" "noanonymous" add_config_value "always_add_missing_headers" "${ALWAYS_ADD_MISSING_HEADERS:-no}" +if [ "${SMTP_PORT}" = "465" ]; then + add_config_value "smtp_tls_wrappermode" "yes" + add_config_value "smtp_tls_security_level" "encrypt" +fi + # Create sasl_passwd file with auth credentials if [ ! -f /etc/postfix/sasl_passwd ]; then grep -q "${SMTP_SERVER}" /etc/postfix/sasl_passwd > /dev/null 2>&1