Hello there. For the past couple of days, I’ve been struggling to setup a Discourse forum, and all the struggle came from the email. I was able to get the forum up by skipping email signup, but I still need it to be functional so people can sign up as well. I have been getting the same results again and again, and I’ve tried many different things, but none seem to have worked. Every time, one of the two would happen:
- Test email error would say "hostname . . . does not match the server cetificate
- Test email error would say “502” and in the Sidekiq, the error would be
Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>
So, when does each one appear. Well, number one appears in every single scenario. Number two on the other hand appeared when I used Port 465. It would take some time for it to “send a test email”, and then that error would appear. Just now, I disabled SSL, so Port 587 is usable, but instead of having the error one or two, it is just stuck at “Sending test Email”.
I am not sure what to do at this point, and I’ve been struggling with this for a few days now, and I still have not found a solution. Any help would be very much appreciated. Thank you for your time and help.
UPDATE: Using the
curl --ssl-reqd command, I tested ports 465, 587, 25, and 2525. The results were:
25: Did not work (Curl error 35, wrong version number)
465: Worked as intended and fast email response
587: Did not work (Curl error 35, wrong version number)
2525: Did not fail, but never sent an email (time spent counted up and never stopped while sending no email)
If it helps, my current settings are (with the 502 error):
DISCOURSE_SMTP_ADDRESS: CENSORED DISCOURSE_SMTP_PORT: 465 DISCOURSE_SMTP_USER_NAME: CENSORED DISCOURSE_SMTP_PASSWORD: CENSORED # DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.ratelimited.template.yml" ## Uncomment these two lines if you wish to add Lets Encrypt (https) - "templates/web.ssl.template.yml" - "templates/web.letsencrypt.ssl.template.yml"
expose: - "80:80" # http - "443:443" # https
This is an image with the email information: