Project

General

Profile

Actions

Defect #11034

closed

TLS configuration documentation for Rails 3

Added by Martin Lindhe almost 12 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Documentation
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Since upgrading to 2.0.0 (also verified today on 2.0.1, and svn trunk) the smtp configuration settings for TLS encryption is somewhat broken, as notified by [1].

If a smtp server is configured with both "tls: true" and "enable_starttls_auto: true", this error occurs when trying to send mail:

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

This type of configuration is also the suggested method for configuring gmail in the redmine documentation [2].

As a workaround found by [1], you can remove the "tls: true" part of the configuration, while leaving in "enable_starttls_auto: true". I can also confirm that this workaround works for me, to make gmail & redmine working.

[1]: http://mentalized.net/journal/2012/05/08/rails_3_actionmailer_and_google_apps_for_domains/
[2]: http://www.redmine.org/projects/redmine/wiki/EmailConfiguration


Files

configuration.yml (7.14 KB) configuration.yml Rodrigo Macedo, 2013-01-03 13:39
Actions #1

Updated by Daniel Nelson almost 12 years ago

Confirmed that using only enable_starttls_auto: true fixes the issue.

Actions #2

Updated by Bruno Medeiros almost 12 years ago

Same problem here, and the workaround also worked. Thanks!

Actions #3

Updated by Jean-Philippe Lang over 11 years ago

  • Subject changed from TLS configuration broken since 2.0 to TLS configuration documentation for Rails 3
  • Category changed from Email notifications to Documentation
  • Status changed from New to Closed
  • Target version set to 2.1.0
  • Resolution set to Fixed

Example in configuration.yml.example fixed in r10340.

Actions #4

Updated by Rodrigo Macedo about 11 years ago

Help Me.

The problem occurrs in enviromento when start Redmine as Window Service.
My OS is Windows XP
Environment:
Redmine version 2.2.0.stable
Ruby version 1.9.2 (i386-mingw32)
Rails version 3.2.9
Environment development
Database adapter Mysql2
Redmine plugins:
no plugin installed

Actions #5

Updated by BTR Naidu almost 11 years ago

The suggested workaround did not work for me. Any more ideas?

Actions #6

Updated by Wally Atkins over 10 years ago

Agreed with the above comment. I had email notifications working fine in Redmine 1.x but on upgrading to 2.x (actually 2.3.2.stable) the GMail notification email relay is not working. I have tried a bunch of different configuration settings and have not been able to get the right combination. Here is my current config:

default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: 587
      domain: "smtp.gmail.com" 
      authentication: :plain
      user_name: "MyGMailAccount@gmail.com" 
      password: "areallyhardpassword" 

When I had tls: true in there I would get An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol) but without the tls: true I get An error occurred while sending mail (530 5.7.0 Must issue a STARTTLS command first. fy7sm9145396qeb.1 - gsmtp ).

Are there further items that I should check to make sure I have everything required on my system/environment? What is the best way to debug/test this to get down to the nitty gritty details and pinpoint my problem? Any suggestions are greatly appreciated!

Actions

Also available in: Atom PDF