From 4ad491d446b1d7d05b39f9d7342845ac81951ecc Mon Sep 17 00:00:00 2001 From: Martin Balvers Date: Thu, 22 Feb 2024 14:52:05 +0100 Subject: [PATCH] fix: change default setting of SMTP_SSL Changed the defaukt of SMTP_SSL to not set. Now the ssl: setting in configuration.yml is only present if SMTP_SSL is explicitly set. --- README.md | 2 +- assets/runtime/env-defaults | 1 - assets/runtime/functions | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a4be894..0c68028b 100644 --- a/README.md +++ b/README.md @@ -659,7 +659,7 @@ Below is the complete list of parameters that can be set using environment varia - **SMTP_OPENSSL_VERIFY_MODE**: SMTP openssl verification mode. Accepted values are `none`, `peer`, `client_once` and `fail_if_no_peer_cert`. SSL certificate verification is performed by default. - **SMTP_STARTTLS**: Enable STARTTLS. Defaults to `true`. - **SMTP_TLS**: Enable SSL/TLS. Defaults to `false`. -- **SMTP_SSL**: Enable SSL. Defaults to `false`. +- **SMTP_SSL**: Enable SSL. Defaults to not set. https://www.redmine.org/projects/redmine/wiki/EmailConfiguration#Error-TimeoutError-due-to-SSL-SMTP-server-connection - **SMTP_AUTHENTICATION**: Specify the SMTP authentication method. Defaults to `:login` if `SMTP_USER` is set. - **SMTP_CA_ENABLED**: Enable custom CA certificates for SMTP email configuration. Defaults to `false`. diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 4519edfd..39fe88b2 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -96,7 +96,6 @@ SMTP_PASS=${SMTP_PASS:-} SMTP_OPENSSL_VERIFY_MODE=${SMTP_OPENSSL_VERIFY_MODE:-} SMTP_STARTTLS=${SMTP_STARTTLS:-true} SMTP_TLS=${SMTP_TLS:-false} -SMTP_SSL=${SMTP_SSL:-false} SMTP_CA_ENABLED=${SMTP_CA_ENABLED:-false} SMTP_CA_PATH=${SMTP_CA_PATH:-$REDMINE_DATA_DIR/certs} SMTP_CA_FILE=${SMTP_CA_FILE:-$REDMINE_DATA_DIR/certs/ca.crt} diff --git a/assets/runtime/functions b/assets/runtime/functions index fe7c2b16..8fe4bd2c 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -410,6 +410,10 @@ redmine_configure_email_delivery() { else echo "Configuring redmine::email_delivery..." + if [[ -z "${SMTP_SSL}" ]]; then + exec_as_redmine sed -i -e '/{{SMTP_SSL}}/d' ${REDMINE_CONFIG} + fi + if [[ -z "${SMTP_USER}" ]]; then exec_as_redmine sed -i \ -e '/{{SMTP_USER}}/d' \