# SMTP issue with Postfix

**URL:** https://meta.discourse.org/t/smtp-issue-with-postfix/104745
**Category:** Self-hosting
**Created:** [December 20, 2018, 4:59am UTC](https://meta.discourse.org/t/smtp-issue-with-postfix/104745 "2018-12-20T04:59:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![satish](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@satish](https://meta.discourse.org/u/satish)
#### Post date: [December 20, 2018, 4:59am UTC](https://meta.discourse.org/t/smtp-issue-with-postfix/104745/1 "2018-12-20T04:59:16Z")

</div>

I installed Discourse on Ubuntu 18.04, also installed Postfix for SMTP email but Discourse is not sending any email. I’m not able to register admin account. Could anyone help me please on this.

Followed instruction from this.  
[https://meta.discourse.org/t/emails-with-local-smtp/23645/13](https://meta.discourse.org/t/emails-with-local-smtp/23645/13)

If I use below command to send email then I’m getting emails. It means Postfix is working.

`echo "This is the body of the email" | mail -s "This is the subject line" user@example.com`

Here is SMTP section from my /var/discourse/containers/app.yml

```
#TODO: The SMTP mail server used to validate new accounts and send notifications
#SMTP ADDRESS, username, and password are required
#WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
DISCOURSE_SMTP_ADDRESS: 33.165.221.244
#DISCOURSE_SMTP_PORT: 587
#DISCOURSE_SMTP_USER_NAME: 
#DISCOURSE_SMTP_PASSWORD: ""
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

```

Am i missing something here for SMTP settings??

---

<div class="post-metadata">

### Author: ![satish](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@satish](https://meta.discourse.org/u/satish)
#### Post date: [December 20, 2018, 11:11pm UTC](https://meta.discourse.org/t/smtp-issue-with-postfix/104745/3 "2018-12-20T23:11:25Z")

</div>

has anyone faced this kind of issue? any help on this? thanks!

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [December 21, 2018, 9:41pm UTC](https://meta.discourse.org/t/smtp-issue-with-postfix/104745/5 "2018-12-21T21:41:00Z")

</div>

> [@satish](#):
>
> 33.165.221.244

I’m guessing this is the IP of the server on which Discourse is running, and you also have a local SMTP server?

From inside the container can you connect to 33.165.221.244 port 25?

If not, you may have better luck using the host’s IP address of the `docker0` bridge instead of the public IP. Can you connect to the host’s `docker0` IP on port 25 from the container?
