FIX: POP3 doesn't work with TLS 1.3
This commit is contained in:
parent
f7ad87995d
commit
56c6e8e961
|
@ -34,7 +34,7 @@ module Jobs
|
|||
|
||||
if SiteSetting.pop3_polling_ssl
|
||||
if SiteSetting.pop3_polling_openssl_verify
|
||||
pop3.enable_ssl
|
||||
pop3.enable_ssl(max_version: OpenSSL::SSL::TLS1_2_VERSION)
|
||||
else
|
||||
pop3.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ task "emails:import" => :environment do
|
|||
|
||||
mails_left = 1
|
||||
pop3 = Net::POP3.new(address, port)
|
||||
pop3.enable_ssl if ssl
|
||||
pop3.enable_ssl(max_version: OpenSSL::SSL::TLS1_2_VERSION) if ssl
|
||||
|
||||
while mails_left > 0
|
||||
pop3.start(username, password) do |pop|
|
||||
|
|
Loading…
Reference in New Issue