Email not working but i can access smtp server from container

Hey.

I’ve a problem setting up a smtp server.
The email server is using port 465 to let users connect to smtp.
Discourse-Doctor shows me the following:

Testing sending to my@email.com using INTERNAL_IP:465.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Net::ReadTimeout

but going into the container and executing openssl s_client -connect INTERNAL_IP:465 works normally. Using the email test on the frontend shows the error after some time but there is nothing in the logs. My email settings:

  DISCOURSE_SMTP_ADDRESS: INTERNAL_IP
  DISCOURSE_SMTP_PORT: 465
  DISCOURSE_SMTP_USER_NAME: username@myemail.com
  DISCOURSE_SMTP_PASSWORD: MY_PASSWORD
  DISCOURSE_SMTP_ENABLE_START_TLS: false

i also tried setting DISCOURSE_SMTP_AUTHENTICATION: "login".

Please let me know if you have any ideas,
felixoi

My most informed guess here is that you’re trying to establish an insecure connection over a secure port. Can your mail server be configured to listen on port 25? if so, try using that

I think that’s it but i need to establish a ssl connection and not start tls. It’s a production server so I actually dont want to configure it using port 25

Then I’d recommend using the FQDN for the mail server that has a valid ssl certificate configured.

1 Like