# SSL\_connect SYSCALL on e-mail confirmation message

**URL:** https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120
**Category:** Support
**Created:** [2016年八月24日 02:33 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120 "2016-08-24T02:33:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![TDR150](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdr150/32/121583_2.png) [@TDR150](https://meta.discourse.org/u/TDR150)
#### Post date: [2016年八月24日 02:33 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/1 "2016-08-24T02:33:43Z")

</div>

Hello!

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.

Thanks for your help!

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2016年八月24日 02:46 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/2 "2016-08-24T02:46:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![TDR150](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdr150/32/121583_2.png) [@TDR150](https://meta.discourse.org/u/TDR150)
#### Post date: [2016年八月27日 16:14 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/3 "2016-08-27T16:14:43Z")

</div>

Hey again,

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?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2016年八月28日 00:27 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/4 "2016-08-28T00:27:08Z")

</div>

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`).

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [2019年一月15日 21:00 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/5 "2019-01-15T21:00:00Z")

</div>

A little curious on this, I see the exact same error in my logs, except it’s only about once a week

> Job exception: SSL\_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A

This is the stack trace:

```plaintext
/usr/local/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock'
/usr/local/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/local/lib/ruby/2.5.0/net/pop.rb:553:in `do_start'
/usr/local/lib/ruby/2.5.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/app/jobs/base.rb:185:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:81:in `process_queue'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:29:in `block in initialize'

```

It appears to be related to a the pop3 mailbox (which is gmail). Any idea what this might be?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2022年一月1日 17:11 UTC](https://meta.discourse.org/t/ssl-connect-syscall-on-e-mail-confirmation-message/49120/6 "2022-01-01T17:11:40Z")

</div>


