From 8c50fe7d4c5d5d820935a275180f1e4b1140f895 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 20 Feb 2020 11:10:20 +0100 Subject: [PATCH] Add variables with TLS CA configuration for mail [SCI-4370] --- config/environments/production.rb | 4 +++- config/secrets.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 2ed59cae6..e94b69fbf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -41,7 +41,9 @@ Rails.application.configure do enable_starttls_auto: true, user_name: Rails.application.secrets.mailer_user_name, password: Rails.application.secrets.mailer_password, - openssl_verify_mode: Rails.application.secrets.mailer_openssl_verify_mode + openssl_verify_mode: Rails.application.secrets.mailer_openssl_verify_mode, + ca_path: Rails.application.secrets.mailer_openssl_ca_path, + ca_file: Rails.application.secrets.mailer_openssl_ca_file } #config.action_mailer.perform_deliveries = false diff --git a/config/secrets.yml b/config/secrets.yml index 1f463e8b0..d7ae8cd6e 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -42,6 +42,8 @@ common: &common mailer_user_name: <%= ENV["SMTP_USERNAME"] %> mailer_password: <%= ENV["SMTP_PASSWORD"] %> mailer_openssl_verify_mode: <%= ENV["SMTP_OPENSSL_VERIFY_MODE"] || "peer" %> + mailer_openssl_ca_path: <%= ENV["SMTP_OPENSSL_CA_PATH"] || "/etc/ssl/certs" %> + mailer_openssl_ca_file: <%= ENV["SMTP_OPENSSL_CA_FILE"] || "/etc/ssl/certs/ca-certificates.crt" %> # ====================================================================== # Your secret key is used for verifying the integrity of signed cookies.