SMTP connection problem, docker installation

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.

1 Like

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):

https://github.com/discourse/discourse/blob/be3a5a56ccc284b352aa65080fc6b955f73cc72a/config/discourse_defaults.conf#L74

3 Likes

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.