我正在尝试使用 IMAP,但它不起作用。我对“https”进行了同样的尝试,它奏效了。
require 'net/imap'
=> true
irb(main):002:0> Net::IMAP.new("xxx", 993, true).login("redmine", "redmine")
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
from /usr/local/lib/ruby/1.9.1/net/imap.rb:1439:in `connect'
from /usr/local/lib/ruby/1.9.1/net/imap.rb:1439:in `start_tls_session'
from /usr/local/lib/ruby/1.9.1/net/imap.rb:1036:in `initialize'
from (irb):2:in `new'
from (irb):2
from /usr/local/bin/irb:12:in `<main>'
irb(main):003:0>
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
gem -v 1.8.24
这类似于:https ://www.chiliproject.org/boards/1/topics/2076
openssl s_client -connect klevas.mif.vu.lt:imaps
显示证书已过期。但是,在 Ruby 和 Gem 相同的另一个系统上,IMAP 连接有效。