]> cat aescling's git repositories - mastodon.git/commitdiff
Allow to set CA file for SMTP (#2713)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Tue, 2 May 2017 23:03:12 +0000 (08:03 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 2 May 2017 23:03:12 +0000 (01:03 +0200)
.env.production.sample
config/environments/production.rb

index 5ef76caa58f8a7a6ef906786162a6a7e2cdd050f..ca0314824bb23362ba1d2f24442c46aac8e783e1 100644 (file)
@@ -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
 
index fde69dc70892724ed4152094f3dc09e7e1c41c4d..a1cd0fb35b4c0df048384c4e2fa0579ded2fa495 100644 (file)
@@ -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,
   }