The user is experiencing issues with email sending in Discourse, with postfix logs showing connection drops after EHLO and authentication failures. Initial troubleshooting points to a TLS issue, as Discourse attempts authentication before STARTTLS, which postfix rejects. The user enables DISCOURSE_SMTP_ENABLE_START_TLS but still faces issues, with tshark logs showing the connection attempts but no email delivery. The problem persists even after switching to a Let’s Encrypt certificate. The user notes that the same setup works with phpBB, suggesting a Discourse-specific issue. Additional issues include a Couldn't parse private ssl_key error in dovecot and rejection by Yandex.Mail due to lack of SSL/TLS encryption. The user suspects a configuration problem in Discourse, particularly with SSL/TLS settings, and considers rebuilding the setup.
Where is postfix running? On the host machine? Maybe docker cannot connect to it? But when it can, it’s a good bet that no one will accept mail from your server.
This is a docker/postfix problem, not a Discourse problem.
Postfix is running on the local machine and it said connection established, you can see that in the logs I posted. I can even run sudo /var/discourse/launch enter and run telnet mail.bluelightos.org 587. The only issue is with discourse disconnecting immediately from the postfix server. You can see that it did that at this point in the logs:
Jan 30 22:17:30 SpaceboyRoss01 postfix/submission/smtpd[31050]: connect from unknown[172.17.0.2]
Jan 30 22:17:30 SpaceboyRoss01 postfix/submission/smtpd[31050]: lost connection after EHLO from unknown[172.17.0.2]
Jan 30 22:17:30 SpaceboyRoss01 postfix/submission/smtpd[31050]: disconnect from unknown[172.17.0.2] ehlo=1 auth=0/1 commands=1/2
There’s no way this can be a postfix/docker issue since I can connect to it from any mail client and the logs are saying that discourse is disconnecting.
I used a self signed certificate for the mail server as I was told to do in the guide I used for setting up the mail server. And here’s the tshark results:
I’ve never setup Let’s Encrypt but I know a guy who can help me with that so I’ll get the Let’s Encrypt setup tomorrow. Setting DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none doesn’t work. If there’s logs for Discourse then I don’t know where they are.
I tried using Yandex.Mail and I’m getting the same results: connects but fails to send email. So it seems like there’s a specific option I’m not enabling correctly even though I’m using the standard configs in the email section but with different email, password, and SMTP domain. I’m going to try rebuilding again to see if that’ll help.