From 26bc5915727e0a0173c03cb49f5193dd612fb888 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 3 May 2017 08:03:12 +0900 Subject: [PATCH] Allow to set CA file for SMTP (#2713) --- .env.production.sample | 1 + config/environments/production.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/.env.production.sample b/.env.production.sample index 5ef76caa5..ca0314824 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -46,6 +46,7 @@ SMTP_FROM_ADDRESS=notifications@example.com #SMTP_DOMAIN= # defaults to LOCAL_DOMAIN #SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail #SMTP_AUTH_METHOD=plain +#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt #SMTP_OPENSSL_VERIFY_MODE=peer #SMTP_ENABLE_STARTTLS_AUTO=true diff --git a/config/environments/production.rb b/config/environments/production.rb index fde69dc70..a1cd0fb35 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -99,6 +99,7 @@ Rails.application.configure do :password => ENV['SMTP_PASSWORD'].presence, :domain => ENV['SMTP_DOMAIN'] || ENV['LOCAL_DOMAIN'], :authentication => ENV['SMTP_AUTH_METHOD'] == 'none' ? nil : ENV['SMTP_AUTH_METHOD'] || :plain, + :ca_file => ENV['SMTP_CA_FILE'].presence, :openssl_verify_mode => ENV['SMTP_OPENSSL_VERIFY_MODE'], :enable_starttls_auto => ENV['SMTP_ENABLE_STARTTLS_AUTO'] || true, }