# Failing to connect to SMTP mail server

**URL:** <https://meta.discourse.org/t/failing-to-connect-to-smtp-mail-server/112737>\
**Category:** Self-hosting\
**Created:** [March 27, 2019, 5:53pm UTC](https://meta.discourse.org/t/failing-to-connect-to-smtp-mail-server/112737 "2019-03-27T17:53:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Eisfunke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eisfunke/32/135343_2.png) [@Eisfunke](https://meta.discourse.org/u/Eisfunke)\
**Post date:** [March 27, 2019, 8:30pm UTC](https://meta.discourse.org/t/failing-to-connect-to-smtp-mail-server/112737/3 "2019-03-27T20:30:42Z")

</div>

Telnetting from _inside_ the container and `discourse-doctor` both failed with the exact same message.

It brought me onto the right track though. I tried out `telnet` from some other machines and stumbled upon the problem with one with IPv6 disabled: My mail server didn’t accept IPv4 connections.  
Nextcloud and Gitea on the same machine were fine using IPv6, but Discourse seemingly doesn’t (maybe a Docker limitation?).

Anyway: I fixed the mail server config and it works flawlessly now. Thanks for the help! 😄

---

_[View the full topic](https://meta.discourse.org/t/failing-to-connect-to-smtp-mail-server/112737)._
