Users are troubleshooting an SSL-related error (SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A) when Discourse attempts to send or receive emails. TDR150 reports the issue occurs despite correct SMTP credentials and TLS enabled, seeking help to determine if the fault lies with their server or SMTP provider. mpalmer suggests the issue stems from a mismatch in SSL/TLS settings, clarifying that TLS (SMTPS) and STARTTLS are distinct, and advises reviewing DISCOURSE_SMTP environment variables in the container config (e.g., app.yml). TDR150 confirms their provider supports STARTTLS and asks about Discourse’s TLS version requirements; mpalmer replies that Discourse uses whatever TLS versions OpenSSL supports. Separately, RBoy reports the same error occurring weekly, tied to a POP3 mailbox (Gmail), with a stack trace pointing to poll_mailbox.rb. The error appears to occur during SSL handshake initiation, likely due to protocol or cipher mismatches between Discourse and the email server, particularly when using POP3 over SSL/TLS. The community is seeking configuration guidance to resolve inconsistent SSL negotiation failures.
I am new to Discourse and have just recently installed it on my server. I’m using an external SMTP provider for sending e-mails and have verified to 100% that the input credentials in the configuration file are correct.
However, upon sending the message I get this error in the production log:
Job exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
I need help pinpointing where it breaks (as google results are difficult to relate to Discourse). Is this something related to the server side regarding SSL or is it an error on the SMTP provider’s part? What actions should I take? I have set TLS to true and my SMTP provider supports this.
What’s your e-mail configuration look like? There’s a mismatch in SSL settings between you and your provider. It’s important to remember that TLS (SMTPS) and STARTTLS are very different things.
Okay, then I understand. I have verified that my provider supports STARTTLS. What exactly do you mean by my e-mail configuration? I’m not really sure how Discourse sends its messages so it’s probably indeed something wrong on my side. What TLS version does Discourse require?
Discourse makes no particular demands around TLS versions; whatever OpenSSL supports, we’ll use. Your e-mail configuration is all of the env vars starting with DISCOURSE_SMTP in your container definition (/var/docker/containers/*.yml, typically app.yml).