# בעיית דואר ב-discourse עם שרת פרוקסי הפוך

**URL:** <https://meta.discourse.org/t/mail-problem-on-discourse-with-reverse-proxy/217563>\
**Category:** Self-hosting\
**Created:** [8 בפברואר,‏ 2022,‏ 8:04pm UTC](https://meta.discourse.org/t/mail-problem-on-discourse-with-reverse-proxy/217563 "2022-02-08T20:04:01Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)\
**Post date:** [8 בפברואר,‏ 2022,‏ 9:21pm UTC](https://meta.discourse.org/t/mail-problem-on-discourse-with-reverse-proxy/217563/13 "2022-02-08T21:21:09Z")

</div>

## How to debug issues with first connection to smtp server

### 1. Enter your container:

`./launcher enter app`

### 2. Check dns resolution for your smtp server name via `getent hosts`:

(`dig`, `nslookup`, `ping` etc. are not installed inside the container.)

```bash
getent hosts your.smtp.server

```

Result on success:

```bash
# IPv4
123.123.123.123 your.smtp.server

# IPv6
2001:db8:0:0:0:ff00:42:8329 your.smtp.server

```

### 3. Try to open a connection to your smtp server via `openssl`:

(`telnet`, `nc` etc. are not installed inside the container.)

Fiddle with some different settings until you succeed with a connection.

```bash
openssl s_client -connect your.smtp.server:465
openssl s_client -connect your.smtp.server:587 -starttls smtp

# IPv4
openssl s_client -connect 172.17.0.123:465
openssl s_client -connect 172.17.0.123:587 -starttls smtp

# IPv6
openssl s_client -6 -connect "[2001:db8:0:0:0:ff00:42:8329]:465"
openssl s_client -6 -connect "[2001:db8:0:0:0:ff00:42:8329]:587" -starttls smtp

```

See: [How to check SMTP connection → Step 3: Checking SMTP Connection Over TLS Using Openssl](https://netcorecloud.com/tutorials/smtp-connection-from-command-line/)

### 4. Use your found working connection settings with Discourse.

🚀

### Bonus: show Discourse IP from inside docker container

( `ifconfig` , `ip` etc. are not installed inside the container.)

```bash
hostname -I

```

Result like:

```bash
172.17.0.2

```

---

_[View the full topic](https://meta.discourse.org/t/mail-problem-on-discourse-with-reverse-proxy/217563)._
