Failure to send emails from Gitlab-CE

Hello.

I’ve started using gitlab-ce and have been pretty happy with it.

With a recent update though, mails have stopped working altogether for no apparent reason at first.

I’m using my own smtp server and have configured smtp_settings.rb accordingly, but get this error now in sidekiq log :

2017-05-30T20:49:22.832Z 11575 TID-otpuvvzdc WARN: {"context":"Job raised exception","job":{"class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","wrapped":"ActionMailer::DeliveryJob","queue":"mailers","args":[{"job_class":"ActionMailer::DeliveryJob","job_id":"7aaed424-4475-424f-ad4a-4401cd94f91d","queue_name":"mailers","arguments":["DeviseMailer","confirmation_instructions","deliver_now",{"_aj_globalid":"gid://gitlab/User/27"},"9co1fFfnYHt2cSVn_biU",{"_aj_symbol_keys":[]}],"locale":"en"}],"retry":3,"jid":"087cee83c8ecffb215cb67f9","created_at":1496177182.3099568,"enqueued_at":1496177362.7452323,"error_message":"SSL_connect returned=1 errno=0 state=error: certificate verify failed","error_class":"OpenSSL::SSL::SSLError","failed_at":1496177182.369098,"retry_count":3,"retried_at":1496177362.8317814},"jobstr":"{\"class\":\"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper\",\"wrapped\":\"ActionMailer::DeliveryJob\",\"queue\":\"mailers\",\"args\":[{\"job_class\":\"ActionMailer::DeliveryJob\",\"job_id\":\"7aaed424-4475-424f-ad4a-4401cd94f91d\",\"queue_name\":\"mailers\",\"arguments\":[\"DeviseMailer\",\"confirmation_instructions\",\"deliver_now\",{\"_aj_globalid\":\"gid://gitlab/User/27\"},\"9co1fFfnYHt2cSVn_biU\",{\"_aj_symbol_keys\":[]}],\"locale\":\"en\"}],\"retry\":3,\"jid\":\"087cee83c8ecffb215cb67f9\",\"created_at\":1496177182.3099568,\"enqueued_at\":1496177362.7452323,\"error_message\":\"SSL_connect returned=1 errno=0 state=error: certificate verify failed\",\"error_class\":\"OpenSSL::SSL::SSLError\",\"failed_at\":1496177182.369098,\"retry_count\":2,\"retried_at\":1496177315.9342234}"}
2017-05-30T20:49:22.832Z 11575 TID-otpuvvzdc WARN: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed

From what i understand there’s a SSL error with my server, but it works fine when I connect to it with Thunderbird to send mails.

I tried disabling ssl in smtp_settings.rb in config/initializers but strangely, I still got the same kind of error, even with this configuration :

if Rails.env.production?
  Rails.application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: 'localhost',
    port: 25,
    user_name: 'xxxxx',
    password: 'xxxxx',
    domain: 'mydomain',
    authentication: :login,
    enable_starttls_auto: true,
    openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options
  }
end

It’s as if Gitlab is ignoring the file’s contents ?

Does someone have the same problem?