SMTP connection problem, docker installation

AI-generated summary

Users are troubleshooting an SMTP connection issue during a Docker-based Discourse installation, specifically when trying to receive the admin activation email. The error log shows: Job exception: 504 5.7.4 Unrecognized authentication type, which occurs when using Microsoft Exchange as the mail server. claas suggests changing the SMTP authentication method from the default plain to login by adding DISCOURSE_SMTP_AUTHENTICATION: login in the app.yml file (for Docker installs) or smtp_authentication = login in discourse.conf (for non-Docker). tvskish confirms they followed the advice but still face the issue, noting the setting was missing from their app.yml. vchrizz recommends adding this fix to the official troubleshooting guide, as the error message is misleading without context. steko advises testing with a known-working third-party service like Mailgun to isolate whether the problem lies with Discourse or the Exchange server. The core issue appears to be Exchange’s requirement for login authentication instead of plain, which Discourse defaults to.

I installed discourse, run it and trying to Sign in as administrator. But I did not receive activation email. I see this message in log file

Sent mail to my_email (10182.6ms)
Job exception: 504 5.7.4 Unrecognized authentication type

What does it mean? We are using Exchange as mail server

Could you provide more details about your SMTP connection settings? You could try testing with a third party service that is known to work e.g. Mailgun to see if the issue is with Discourse or the Exchange server.

If you use discourse_docker, try setting this in your app.yml:

DISCOURSE_SMTP_AUTHENTICATION: login

If you don’t use docker, try setting this in your discourse.conf:

smtp_authentication = login

By default, Discourse uses plain authentication (which is not what MS Exchange expects):

Friends,
Even I am getting the same error “Job exception: 504 5.7.4 Unrecognized authentication type”. Followed the instructions as “Claas Aug” mentioned. Still same issue.
I don’t see “DISCOURSE_SMTP_AUTHENTICATION: login” in app.yml

Here are contents of my app.yml file

  DISCOURSE_SMTP_ADDRESS: ourSMTPserver.company.com
  DISCOURSE_SMTP_PORT: 25
  DISCOURSE_SMTP_USER_NAME: testuser@company.com
  DISCOURSE_SMTP_PASSWORD: "PAssword"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

Any one can help to troubleshoot it further?

Many thanks for this hint!
I think it should be added to Troubleshooting email on a new Discourse install because the error message in production.log Job exception: 504 5.7.4 Unrecognized authentication type is not really helpful to debug if you dont know you have to handle exchange a bit different.