mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:03:43 +08:00
FEATURE: support DISCOURSE_SMTP_FORCE_TLS option (#11733)
Background: RFC 8314 3.3 asks that: clients and servers SHOULD implement both STARTTLS on port 587 and Implicit TLS on port 465 Discourse currently cannot be configured this way. With this patch, it's possible to set DISCOURSE_SMTP_FORCE_TLS=true to use implicit TLS on port 465
This commit is contained in:
parent
19b2011601
commit
9aeece465f
|
@ -92,6 +92,9 @@ smtp_enable_start_tls = true
|
|||
# to disable, set to 'none'
|
||||
smtp_openssl_verify_mode =
|
||||
|
||||
# force implicit TLS as per RFC 8314 3.3
|
||||
smtp_force_tls = false
|
||||
|
||||
# load MiniProfiler in production, to be used by developers
|
||||
load_mini_profiler = true
|
||||
|
||||
|
|
|
@ -37,6 +37,10 @@ Discourse::Application.configure do
|
|||
|
||||
settings[:openssl_verify_mode] = GlobalSetting.smtp_openssl_verify_mode if GlobalSetting.smtp_openssl_verify_mode
|
||||
|
||||
if GlobalSetting.smtp_force_tls
|
||||
settings[:tls] = true
|
||||
end
|
||||
|
||||
config.action_mailer.smtp_settings = settings.reject { |_, y| y.nil? }
|
||||
else
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
|
|
Loading…
Reference in New Issue
Block a user