8.9 Mail no longer sends via SMTP and attempts to use native sendmail - /usr/sbin/sendmail: not foun

Issue

After upgrading to 8.9 all mail was dispatched via sendmail where as the config/initializers/smtp_settings.rb file is set to dispatch via SMTP.

As sendmail is not configured on the server, we would see in the sidekiq.log:

sh: 1: /usr/sbin/sendmail: not found

Also mentioned in:

gitlab-com/infrastructure#128

Which notes omnibus fixes here

omnibus-gitlab!826 (merged)

Solution

I propose adding

ActionMailer::Base.delivery_method = :smtp

to

config/initializers/smtp_settings.rb.example