Skip to content

SMTP conflict between 'smtp_enable_starttls_auto' and 'smtp_tls' flags in Omnibus 15.11.1-ee with port 465

Issue

Email notifications broke after upgrading our Omnibus installation from 15.10.1-ee to version 15.11.1-ee

Context

Our SMTP configuration is of type OVH

gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true

Fix

We had to switch the gitlab_rails['smtp_enable_starttls_auto'] flag to false

Steps

Test email through the gitlab-rails console with command:
Notify.test_email('destination_email@address.com', 'Message Subject', 'Message Body').deliver_now

The following error is triggered:
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/mail_starttls_patch.rb:60:in 'build_smtp_session': :enable_starttls and :tls are mutually exclusive. Set :tls if you're on an SMTPS connection. Set :enable_starttls if you're on an SMTP connection and using STARTTLS for secure TLS upgrade. (ArgumentError)

Switch the gitlab_rails['smtp_enable_starttls_auto'] flag to false, reconfigure and test command output is now:
=> #<Mail::Message:342660, Multipart: false, Headers: [...]