# O novo Discourse pode ser instalado sem exigir validação do certificado do servidor SMTP?

**URL:** https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445
**Category:** Self-hosting
**Created:** [Agosto 10, 2018, 9:36pm UTC](https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445 "2018-08-10T21:36:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![stephenz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephenz/32/106448_2.png) [@stephenz](https://meta.discourse.org/u/stephenz)
#### Post date: [Agosto 10, 2018, 9:36pm UTC](https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445/1 "2018-08-10T21:36:37Z")

</div>

I’ve just installed discourse and am trying to find a particular setting so I can overcome a problem I’m having.

I have a local SMTP relay, which is a UTM with spam and virus protection. It accepts relay on port 25, then authenticates to sendgrid via port 587 for mail that is not destined for our internal domains.

I want to get my discourse server to also relay to port 25 in the same manner as every other service on our network that uses email relay. This server is protected by another UTM so that only known hosts can get to it and there are no opportunities for MITM attacks due to the way the network is configured.

I am having this error in /var/discourse/shared/standalong/log/rails/production.log

```plaintext
Sent mail to email@server.com (203.5ms)
Job exception: hostname "mailrelay.network.lan" does not match the server certificate

```

Question: How can I configure discourse to not require certificate validation of the SMTP relay it is configured with?

I am aware of the security implications, but in my network, unencrypted SMTP does not travel outside our server VLAN, which is protected by various security means. Once SMTP traffic needs to leave that VLAN, it gets encrypted.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [Agosto 10, 2018, 9:40pm UTC](https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445/2 "2018-08-10T21:40:37Z")

</div>

Sounds like you need two line changes in your app.yml. Assuming you already have ssh access and are using the standard path and filename (/var/discourse/containers/app.yml):

```
DISCOURSE_SMTP_PORT: 587

```

to:

```
DISCOURSE_SMTP_PORT: 25

```

(which you’ve done by the sounds)

And uncomment:

```
#DISCOURSE_SMTP_ENABLE_START_TLS: true

```

and change to

```
DISCOURSE_SMTP_ENABLE_START_TLS: **false**

```

---

<div class="post-metadata">

### Author: ![stephenz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephenz/32/106448_2.png) [@stephenz](https://meta.discourse.org/u/stephenz)
#### Post date: [Agosto 10, 2018, 10:08pm UTC](https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445/3 "2018-08-10T22:08:16Z")

</div>

Thanks @stephen, that worked perfectly

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [Setembro 9, 2018, 10:09pm UTC](https://meta.discourse.org/t/can-new-discourse-install-not-require-smtp-server-certificate-validation/94445/4 "2018-09-09T22:09:35Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
