SMTP issue with Postfix

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.

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"

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_ENABLE_START_TLS: true           # (optional, default true)

Am i missing something here for SMTP settings??

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

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 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?