# Enables existing Email channels to verify SSL certificates # (MAY break Email communication if certificates are invalid!) Channel .where(area: 'Email::Account Email::Notification') .each do |channel| ['inbound', 'outbound'].each do |dir| next if ['pop3', 'imap', 'smtp'].exclude?(channel.options.dig(dir, :adapter)) next if !channel.options[dir].key? :options channel.options[dir][:options][:ssl_verify] = true end channel.save! end end # Enable SSL certificate verification for i-doit integration # (MAY break i-doit functionality if certificates are invalid!) config = Setting.get('idoit_config') unless config.blank? do Setting.set('idoit_config', config.merge('verify_ssl' => true)) end # Side note: Elasticsearch has an option to verify SSL as well. This might be an edge case. # By default these certificates are self-signed and thus you may not want to run this at all Setting.set('es_ssl_verify', true)