add smtp_tls_wrappermode and smtp_tls_security_level.

You need both parameters when you send emails with TLS(465).
This commit is contained in:
Rev (Tsuyoshi Yamasaki) 2020-12-17 01:18:27 +09:00 committed by Juan Luis Baptiste
parent c53377f8a5
commit f4b70c83e2

5
run.sh
View file

@ -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 "smtp_sasl_security_options" "noanonymous"
add_config_value "always_add_missing_headers" "${ALWAYS_ADD_MISSING_HEADERS:-no}" 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 # Create sasl_passwd file with auth credentials
if [ ! -f /etc/postfix/sasl_passwd ]; then if [ ! -f /etc/postfix/sasl_passwd ]; then
grep -q "${SMTP_SERVER}" /etc/postfix/sasl_passwd > /dev/null 2>&1 grep -q "${SMTP_SERVER}" /etc/postfix/sasl_passwd > /dev/null 2>&1