From 28900676f30e47ecce84de5cabefe80e8eb6bfa6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 17 Feb 2022 00:54:11 +0000 Subject: [PATCH] Default to allowing TLS for SMTP but without peer verification --- config/initializers/action_mailer.rb | 4 ++-- config/settings.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/initializers/action_mailer.rb b/config/initializers/action_mailer.rb index 5cb4ce04e..392191259 100644 --- a/config/initializers/action_mailer.rb +++ b/config/initializers/action_mailer.rb @@ -7,10 +7,10 @@ ActionMailer::Base.smtp_settings = { :port => Settings.smtp_port, :domain => Settings.smtp_domain, :enable_starttls_auto => Settings.smtp_enable_starttls_auto, + :openssl_verify_mode => Settings.smtp_tls_verify_mode, :authentication => Settings.smtp_authentication, :user_name => Settings.smtp_user_name, - :password => Settings.smtp_password, - :openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE + :password => Settings.smtp_password } # Set the host and protocol for all ActionMailer URLs diff --git a/config/settings.yml b/config/settings.yml index 639910f4a..ef46ae216 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -135,7 +135,8 @@ trace_icon_storage: "local" smtp_address: "localhost" smtp_port: 25 smtp_domain: "localhost" -smtp_enable_starttls_auto: false +smtp_enable_starttls_auto: true +smtp_tls_verify_mode: "none" smtp_authentication: null smtp_user_name: null smtp_password: null -- 2.39.5