# SMTP connection problem, docker installation

**URL:** https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981
**Category:** Self-hosting
**Created:** [April 3, 2016, 7:03pm UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981 "2016-04-03T19:03:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sanzhar\_Aubakirov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sanzhar_aubakirov/32/121874_2.png) [@Sanzhar\_Aubakirov](https://meta.discourse.org/u/Sanzhar_Aubakirov)
#### Post date: [April 3, 2016, 7:03pm UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981/1 "2016-04-03T19:03:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![steko](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@steko](https://meta.discourse.org/u/steko)
#### Post date: [April 3, 2016, 7:50pm UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981/2 "2016-04-03T19:50:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)
#### Post date: [July 18, 2016, 12:51pm UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981/3 "2016-07-18T12:51:17Z")

</div>

If you use [discourse\_docker](https://github.com/discourse/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>

---

<div class="post-metadata">

### Author: ![tvskish](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@tvskish](https://meta.discourse.org/u/tvskish)
#### Post date: [November 29, 2017, 5:44am UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981/4 "2017-11-29T05:44:11Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![vchrizz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vchrizz/32/90441_2.png) [@vchrizz](https://meta.discourse.org/u/vchrizz)
#### Post date: [February 24, 2018, 1:59am UTC](https://meta.discourse.org/t/smtp-connection-problem-docker-installation/41981/5 "2018-02-24T01:59:00Z")

</div>

Many thanks for this hint!  
I think it should be added to [Troubleshooting email on a new Discourse install](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/2) 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.
