Below are what I suppose are the relevant sections out of my app file:
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'iliasb@thewizardofosc<DOT>com'
## 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_ADDRESS: mail<DOT>thewizardofosc<DOT>com
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: discourse@thewizardofosc<DOT>com
DISCOURSE_SMTP_PASSWORD: <PASSWORD>
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: me@example<DOT>com
Strange. If you can connect from outside the container then you can see if that curl command will work inside the container. My only guess is that you have some networking problem with docker.
Yeah, it was a long shot… sorry to have wasted your time on that one!
My only other “crazy idea” at the moment is to see if you can go into your mail server (who ever it is) and set the port to 587 (many SMTP providers give you a choice) and “roll the dice again” with DISCOURSE_SMTP_ENABLE_START_TLS: true again, of course.
Frankly, normally am not a “dice roller” and am more fact-driven; so if you don’t want to try, I perfectly understand @onar3d !!
Understood. I am all out of “crazy ideas” at the moment and it’s time for me to wind down for the night here; good luck and hopefully one of the smart team members here will have some better ideas to try.
After a few more attempts (thank you very much @IAmGav!), my Discourse setup was confirmed to work with a different email server, which rules out a number of things to try.
My email server provider got back to me with an error log message form their part and suggestion:
The engineer has checked the logs and the error seen from their ip is with the SSL settings. Most likely they are using an old version/connection settings
Proof:
TLS error on connection from [95.216.139.49]:33568 SSL_accept: TCP connection closed by peer
Try with the SSL mode turned OFF just to see if it works.
I tried with
DISCOURSE_SMTP_ENABLE_START_TLS set to false as per above, on port 465 as well as 26 (listed by my provider as the port for non-SSL connection), neither worked.
Could it be because I have not purchased an SSL certificate for the domain thewizardofosc.com, I realize now after reading up a bit more?
You might consider running your curl tests with the verbose option enabled -v off the top-of-my-head, so you can fully analyze the successful handshake; and then work backwards from that analysis.