Project

General

Profile

An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)

Added by arul baskar over 11 years ago

configuration.yml

development:
email_delivery:
delivery_method: :smtp
smtp_settings:
#tls: true
#enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name"
port: 25
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

this code use to for the following error occurs

An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)

--------------------------------------------------------------------------------
development:
email_delivery:
delivery_method: :smtp
smtp_settings:
  1. tls: true
  2. enable_starttls_auto: true
    openssl_verify_mode: 'none'
    address: "domain name"
    port: 587
    authentication: :login
    domain: 'mail domail name'
    user_name: 'mail id'
    password: 'pwd'

this code use to for the following error occurs

An error occurred while sending mail (No connection could be made because the target machine actively refused it. - connect(2))

------------------------------------------------------------------------------------------------------------------
development:
email_delivery:
delivery_method: :async_smtp
smtp_settings:
  1. tls: true
  2. enable_starttls_auto: true
    openssl_verify_mode: 'none'
    address: "domain name"
    port: 25
    authentication: :login
    domain: 'mail domail name'
    user_name: 'mail id'
    password: 'pwd'

no error occurs but still not received mail on the user.
--------------------------------------------------------------

development:
email_delivery:
delivery_method: :smtp
smtp_settings:
  1. tls: true
  2. enable_starttls_auto: true
    openssl_verify_mode: 'none'
    address: "domain name"
    port: 25
    authentication: :login
    domain: 'mail domail name'
    user_name: 'mail id'
    password: 'pwd'

this code to use redmine version 2.2.3 to use work with fine. but version 2.3.0 to use not working now.


Replies (7)

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by Leo L. over 11 years ago

Same problem here.
It worked well in redmine 2.2, but today I'm testing 2.3 and mails are not sent anymore.
I always get the error : "SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol".

I kept the configuration untouched from 2.2 to 2.3 :

default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: 192.168.10.126
      port: 25
      domain: 123-opportunity.com
      openssl_verify_mode: none

Adding lines like

enable_starttls_auto: true

... don't make it better.

Also, in postfix logs, I found :

Apr 15 18:53:02 srv-postfix postfix/smtpd[30924]: connect from unknown[192.168.10.239]
Apr 15 18:53:02 srv-postfix postfix/smtpd[30924]: lost connection after UNKNOWN from unknown[192.168.10.239]
Apr 15 18:53:02 srv-postfix postfix/smtpd[30924]: disconnect from unknown[192.168.10.239]

Hope this helps out in finding what happens...

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by Leo L. over 11 years ago

Just solved it.

Add two lines :

enable_starttls_auto: false
openssl_verify_mode: 'none'

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by BTR Naidu over 11 years ago

Did not solve for me. My configuration is below:

ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:ssl => true,
:address => "smtp.gmail.com",
:enable_starttls_auto => false,
:port => "587",
:domain => "xyz.com",
:authentication => :plain,
:user_name => "",
:password => "1234",
:openssl_verify_mode => 'none'
}

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by marco deluca over 11 years ago

Hey, I'm having the same problems. Notifications worked in 2.2.3, failed in 2.3.1 using the exact same configuration.yml email settings. If I try this:

with: enable_starttls_auto: true
the error I get is: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol

with: enable_starttls_auto: false
the error I get is: Failed to login to SMTP server: 503 AUTH command used when not advertised

Im trying to play with different settings based on those errors, but what would explain the issue if it worked fine prior to 2.3.x? What changed?

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by Sebastián Sassi over 11 years ago

Di you tried changing the authentication method?
I changed it to "login" and it worked, I also removed the option "tls: true".

delivery_method: :smtp
smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: 587
      domain: "sophilabs.com" 
      authentication: login
      user_name: "user@sophilabs.com" 
      password: "password" 

RE: An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) - Added by Henry Li almost 5 years ago

arul baskar wrote:

Leo,

solve this my problems.

Thank you

it solved my problem, many thanks!

SSL_connect returned=1 errno=0 state=error: unsupported protocol

    (1-7/7)