How to fix issues with SSL certificate?

This article is about the following errors.

Note: Please note that after version 4.1.12 of the Helpdesk plugin, there is an option added in the project helpdek settings to fix this problem: option_skip_cert_verification.png

Error 1: Upon receiving mail

Error: SSL_connect returned=1 errno=0 state=error: certificate verify failed

Error 2: Upon sending mail

An error occurred while sending mail (hostname "" does not match the server certificate)

In these cases, the following changes could help.

1. Error:

Create a new file config/initializers/bypass_ssl_verification.rb (the name of the file is not important) with the following content:

require 'openssl'

Save the changes and restart the webserver.

2. Error:

In file


add the line

:openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE,

at the place shown below:

  def set_delivery_options
    return false if HelpdeskSettings[:helpdesk_smtp_use_default_settings,].to_i == 0
    message.delivery_method.settings.merge!(:address => HelpdeskSettings[:helpdesk_smtp_server,],
                            :port => HelpdeskSettings[:helpdesk_smtp_port,] || 25,
                            :authentication => HelpdeskSettings[:helpdesk_smtp_authentication,] || 'plain',
                            :user_name => HelpdeskSettings[:helpdesk_smtp_username,],
                            :password => HelpdeskSettings[:helpdesk_smtp_password,],
                            :domain => HelpdeskSettings[:helpdesk_smtp_domain,],
                            :enable_starttls_auto => true,
                 here ->    :openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE,
                            :ssl => HelpdeskSettings[:helpdesk_smtp_ssl,].to_i > 0 &&
                                    HelpdeskSettings[:helpdesk_smtp_tls,].to_i == 0)

Save the changes and restart the webserver.

Was this article helpful? Yes  No
942 from 976 found this helpful