Skip to content

Commit

Permalink
fix: change default setting of SMTP_SSL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danone-dev committed Feb 22, 2024
1 parent 11d4e33 commit 4ad491d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 0 additions & 1 deletion assets/runtime/env-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions assets/runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down

0 comments on commit 4ad491d

Please sign in to comment.