FIX: POP3 doesn't work with TLS 1.3

This commit is contained in:
Gerhard Schlager 2019-09-11 18:43:02 +02:00
parent f7ad87995d
commit 56c6e8e961
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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|