# Cannot send email - problem with TLS

**URL:** https://meta.discourse.org/t/cannot-send-email-problem-with-tls/330606
**Category:** Self-hosting
**Tags:** email
**Created:** [October 12, 2024, 6:56pm UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-tls/330606 "2024-10-12T18:56:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![laplasz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laplasz/32/221485_2.png) [@laplasz](https://meta.discourse.org/u/laplasz)
#### Post date: [October 12, 2024, 6:56pm UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-tls/330606/1 "2024-10-12T18:56:59Z")

</div>

Just used /discourse-doctor and got the following error on mail test:

```
Not able to send email Net::ReadTimeout

```

Then I set **DISCOURSE\_SMTP\_FORCE\_TLS: true** as recommended here: [Cannot send email - problem with port 465 - #10 by schungx](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004/10)

But this time I got the following error:

```
TLS and STARTTLS are mutually exclusive

```

So, then I tried to test the TLS connection setup with openssl

```
openssl s_client -connect 127.0.0.1:465 -debug -msg

```

So that command failed as well. The connection was established but no negotiation at all.

```
CONNECTED(00000003)

```

---

<div class="post-metadata">

### Author: ![laplasz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laplasz/32/221485_2.png) [@laplasz](https://meta.discourse.org/u/laplasz)
#### Post date: [October 12, 2024, 7:00pm UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-tls/330606/2 "2024-10-12T19:00:47Z")

</div>

The problem was with the mtu size of docker interface. I have a PPPoE connection which has less then 1500 bytes mtu size - so what I had to do is to set MSS clamping in iptables.

```plaintext
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

```

More info about the solution can be found here: [https://stackoverflow.com/a/79081640/1342413](https://stackoverflow.com/a/79081640/1342413)

---

<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: [November 16, 2024, 2:01pm UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-tls/330606/3 "2024-11-16T14:01:59Z")

</div>

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