Hello everybody,
I have configured SMTP for my GitLab Instance, however the e-mail delivery fails. Here is an output of troubleshooting via rails-console:
➜ ~ gitlab-rails console
--------------------------------------------------------------------------------
Ruby: ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
GitLab: 16.0.1 (34d6370bacd) FOSS
GitLab Shell: 14.20.0
PostgreSQL: 13.8
------------------------------------------------------------[ booted in 45.67s ]
Loading production environment (Rails 6.1.7.2)
irb(main):001:0> ActionMailer::Base.smtp_settings
=> {:user_name=>nil, :password=>nil, :address=>"[MASKED]", :port=>25, :ca_file=>"/opt/gitlab/embedded/ssl/certs/cacert.pem", :open_timeout=>30, :read_timeout=>60}
irb(main):002:0> Notify.test_email('[MASKED]', 'Hello World', 'This is a test message').deliver_now
Delivered mail 6475a8dc55a0a_177adb3174907fb@zhm-lm00.mail (85.7ms)
/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 peeraddr=128.127.50.150:25 state=error: certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError)
As you can see, no TLS has been configured for SMTP, that’s why I am confused about the error. Does anybody know how to troubleshoot this further?