Disable ssl on on ssl ports.

This commit is contained in:
Martin Edenhofer 2016-12-01 16:59:34 +01:00
parent d548dc5613
commit 7c23e334a8
2 changed files with 10 additions and 0 deletions

View file

@ -68,6 +68,11 @@ example
end end
if options.key?(:port) && !options[:port].empty? if options.key?(:port) && !options[:port].empty?
port = options[:port] port = options[:port]
# disable ssl for non ssl ports
if port == 143 && !options.key?(:ssl)
ssl = false
end
end end
Rails.logger.info "fetching imap (#{options[:host]}/#{options[:user]} port=#{port},ssl=#{ssl})" Rails.logger.info "fetching imap (#{options[:host]}/#{options[:user]} port=#{port},ssl=#{ssl})"

View file

@ -53,6 +53,11 @@ returns
end end
if options.key?(:port) && !options[:port].empty? if options.key?(:port) && !options[:port].empty?
port = options[:port] port = options[:port]
# disable ssl for non ssl ports
if port == 110 && !options.key?(:ssl)
ssl = false
end
end end
Rails.logger.info "fetching pop3 (#{options[:host]}/#{options[:user]} port=#{port},ssl=#{ssl})" Rails.logger.info "fetching pop3 (#{options[:host]}/#{options[:user]} port=#{port},ssl=#{ssl})"