Project

General

Profile

Actions

Defect #10981

closed

TLS features not effective on Redmine 2.0.0

Added by William Piedfort almost 12 years ago. Updated almost 5 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I have installed on a host :
Environment:
Redmine version 2.0.0.stable
Ruby version 1.8.7 (i486-linux)
Rails version 3.2.3

The mail serveur on this host is Postfix, works with STL and
and configuration.yml is :
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "localhost"
port: 25

1. Test Mail works if I set TLS at "NO" on Postfix, but this has to remain at "YES" .

So I get an error message "hostname was not match with the server certificate" in test mail, no matter the value in config/environment.rb :
ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false (or true)

I appears to me that I can't disable the TLS feature in the application.
May be there is another feature ?

2 . if I add the parametters in "configuration.yml" :
authentication: :login
user_name: "prx"
password: "passwd"
I have an error at the serveur start in WEBrick : /config/configuration.yml is not a valid YAML file and could not be loaded.

This is not consistant with the examples.

Where is teh clue ?

thanks in advance.


Files

environment.rb (751 Bytes) environment.rb environnement William Piedfort, 2012-05-22 14:59
Actions #1

Updated by Etienne Massip almost 12 years ago

  • Assignee deleted (Jean-Philippe Lang)
Actions #2

Updated by Jean-Philippe Lang almost 12 years ago

William Piedfort wrote:

1. Test Mail works if I set TLS at "NO" on Postfix, but this has to remain at "YES" .

So I get an error message "hostname was not match with the server certificate" in test mail, no matter the value in config/environment.rb :
ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false (or true)

Looks like your server certificate is not valid.
Please try to use the following option in your smtp settings:

openssl_verify_mode: 'none'

I have an error at the serveur start in WEBrick : /config/configuration.yml is not a valid YAML file and could not be loaded.

Please attach you configuration file.

Actions #3

Updated by Jean-Philippe Lang almost 12 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Have a look at: http://davidroetzel.wordpress.com/2011/01/14/rails-3-actionmailer-tls-certificate-verification/
Anyway, this is a Rails configuration issue so I'm closing it.

Actions #4

Updated by William Piedfort almost 12 years ago

Hi,
Yes I knew this option before and added it before in config/environment.rb (see attached): you cannot insert those type of option in configuration file , despite the exemples !

But as I wrote , it seems that, despite the option set not to control (I put it to true or false : no change, it controls the certificate (mine is expired but many applications exchange emails without problems with this Postfix).

So Redmine application use is blocked because of that point.
Other solutions ?

Actions #5

Updated by William Piedfort almost 12 years ago

And I have no other means because:
if I add the parametters in "configuration.yml" :
authentication: :login
user_name: "prx"
password: "passwd"

it fails !
So what else ?

Actions #6

Updated by William Piedfort almost 12 years ago

SOLVED :

in configuration.yml: place

default: # Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "myhost.xxx" (AND NOT "localhost" !!)
port: 25
domain: "mydomain"

the options :
  1. openssl_verify_mode: 'none'
  2. tls: true
  3. enable_starttls_auto: true
  4. authentication: :login or plain
  5. user_name: "user"
  6. password: "passwd"
    are not accepted in this file
    nor :async_smtp : doest not work
  7. Turn off auto TLS for e-mail
    ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false
in config/environment.rb 
To use the option, open up your environment.rb and add the following:

and I 've added :
ActionMailer::Base.smtp_settings[:openssl_verify_mode] = false
restart Apache server

And above all :
change the TLS certificate that is used in Postfix : it HAS to HAVE in Common Name = myhost.xxx (the name of your host , even it is a VPS name).

In this case, Rails 3 accept to talk in TLS security with the host and send your mail immediatly !

Actions #7

Updated by Jean-Philippe Lang almost 12 years ago

  • File deleted (configuration.yml)
Actions #8

Updated by Go MAEDA almost 5 years ago

  • Status changed from Reopened to Closed
  • Priority changed from High to Normal
Actions

Also available in: Atom PDF