1

We use outlook.com (ex hotmail) as mail for our organisation. I'm trying to make redmine to send notifications with our outlook.com account. Redmine 2.3.1 on Debian 7 with ruby from distribution. I've found that since 2.3 option openssl_verify_mode doesn't matter, and merged with enable_starttls_auto (at least in my conf it seems like has no effect), but i'm not sure. I've tried some versions of settings in config/configuration.yml but I've failed.

default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto:     true
      address:                  "smtp.live.com"
      port:                     587
      domain:                   "customdomain.com"
      authentication:           :plain
      user_name:                email@customdomain.com
      password:                 passwd

gets

An error occurred while sending mail (SSL_read:: wrong version number)

and alternative version

default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto:     false
      address:                  "smtp.live.com"
      port:                     587
      domain:                   "customdomain.com"
      authentication:           :plain
      user_name:                email@customdomain.com
      password:                 passwd

gets

An error occurred while sending mail (530 5.7.0 Must issue a STARTTLS command first )

If anybody faced with such problem and have solution?

2 Answers2

2

This is a bug in the Mail gem, as user3261218 describes. It affects other gems dependent on Mail, such as Pony.

The fix is to explicitly specify the SSL version used. Until the Mail gem is updated, you can apply the patch manually by editing lib/mail/network/delivery_methods/smtp.rb in the Mail gem source.

For Mail gem version 2.5.4, this means adding the following line after line number 138

context.ssl_version = :SSLv3
Community
  • 1
  • 1
Alex
  • 9,313
  • 1
  • 39
  • 44
0

I have this issue and solution described in Mail-gem issue tracker

https://github.com/mikel/mail/issues/659

The fix itself is in the following commit:

https://github.com/AlexRevin/mail/commit/a12f77d49c3957bddce3b76cf67587f76fa1acc9

  • Link-only answers are not really answers (even though they may provide a solution), since they depend on external content that could be dead. Is there a way to expand this to be self-contained? – Werner Feb 01 '14 at 20:13