Hi all, I have installed the latest Gitlab CE with Docker using the following docker-compose file (the two lines marked with a ‘#’ are lines I have tried with and without but neither way sees success):
gitlab_rails[‘gitlab_shell_ssh_port’] = 10022
gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = ‘10.0.0.25’
gitlab_rails[‘smtp_port’] = ‘587’
gitlab_rails[‘smtp_domain’] = ‘example.com’
#gitlab_rails[‘smtp_authentication’] = false
#gitlab_rails[‘smtp_tls’] = false
gitlab_rails[‘gitlab_email_from’] = ‘firstname.lastname@example.org’
gitlab_rails[‘gitlab_email_reply_to’] = ‘email@example.com’
With the above configuration, when I go into the gitlab-rails console inside the docker container to send a test email using the following:
Notify.test_email(‘firstname.lastname@example.org’, ‘Message Subject’, ‘Message Body’).deliver_now
I get the following error:
Delivered mail email@example.com (13.6ms)
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:46:in `connect_nonblock’: SSL_connect returned=1 errno=0 state=error: certificate verify failed (Hostname mismatch) (OpenSSL::SSL::SSLError)
As far as I can tell, this error seems to be happening on the gitlab side, although I could be mistaken. I’m not clear on exactly where the error is occurring in the connection process so I wanted to reach out to see.
The relay server should automatically accept the mail from the IP address of this docker container/host. It functions with other sources forwarding mail to it without authentication. Is there a config issue on the gitlab side I am missing or is the problem something I haven’t considered in the tls communication with the relay server?
Thanks for any thoughts!