שליחת אימייל הפסיקה לעבוד לאחר שדרוג

סיכום מבוסס בינה מלאכותית

Mychel reports that email sending stopped working after upgrading Discourse to version 2.9.0.beta4, despite previously working configurations. The error logged in Sidekiq is OpenSSL::SSL::SSLError: certificate verify failed (self signed certificate). Their SMTP settings in app.yml explicitly disable TLS and certificate verification (DISCOURSE_SMTP_ENABLE_START_TLS: false, DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none), and they use an external Postfix server on localhost (172.17.0.1). Moin links to a relevant Meta Discourse thread indicating that disabling STARTTLS or certificate verification may no longer function as expected in recent versions. Mychel thanks Moin for the pointer. The issue appears to stem from changes in Discourse’s handling of SMTP SSL/TLS settings post-upgrade, possibly a regression or intentional security tightening, despite configuration attempts to bypass verification.

Hi,

I had updated my Discourse two days ago and sending mails does not work anymore. I’m unfortunately not sure exactly which version I had before the update, but as the new version is 2.9.0.beta4 and I do updates regularily on notification mails the previous version should have been already some 2.9.0.betaX.

The displayed errors in Sidekiq have this error text:

Jobs::HandledExceptionWrapper: Wrapped OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)

My SMTP configuration in the app.yml is as follows:

  DISCOURSE_SMTP_ADDRESS: 172.17.0.1 # this is the IP Address of the host server on the docker0 interface
  DISCOURSE_SMTP_PORT: 25
  DISCOURSE_SMTP_AUTHENTICATION: none
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
  DISCOURSE_SMTP_ENABLE_START_TLS: false
  DISCOURSE_SMTP_DOMAIN: my.server.domain
  DISCOURSE_NOTIFICATION_EMAIL: noreply@my.server.domain

So my Discourse is configured to utilize the “outer” Postfix installation. This had been working since my installation in September 2021 and TLS is still set to false and OPENSSL_VERIFY_MODE to none.

Does someone got an idea what in the updates might have changed to cause the now occuring problem with sending mails? Could this be a bug?

Thanks, Mychel

Moin (Hi) Moin, thanks a lot for your answer.