Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ssl context for smtp #548

Closed
roxanneskelly opened this issue May 17, 2013 · 24 comments · May be fixed by guigoalmeida/Diary#1 or dhes/pop_man#1
Closed

Problem with ssl context for smtp #548

roxanneskelly opened this issue May 17, 2013 · 24 comments · May be fixed by guigoalmeida/Diary#1 or dhes/pop_man#1

Comments

@roxanneskelly
Copy link

The ruby 1.8.7 smtp provider takes an SSL context in enable_tls
/usr/lib/ruby/1.8/net/smtp.rb:307

in 2.5.4, smtp.rb was refactored to include an ssl_context call
which returns a context for ruby 1.9.0 +, and a string for verify_mode before that.
The result of this is passed down via enable_starttls/enable_starttls_auto to the 1.8.7 provider, which is expecting a context, not a string.

Results in failure:

FAILURE creating account: wrong argument (NilClass)! (Expected kind of OpenSSL::SSL::SSLContext)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:577:in `initialize'

(also on linux).

This was introduced in 2.5.4 (some oddness in 2.5.3 as well)

@korny
Copy link

korny commented May 24, 2013

Downgrading to 2.5.3 fixed the issue for us as well.

@nickhammond
Copy link

I'm also getting this issue, downgrading to 2.5.3 fixed the issue for me.

Can we yank 2.5.4 from rubygems? I just upgraded a few gems and it bumped the mail gem up to 2.5.4 triggering this behavior.

@ConradIrwin
Copy link
Collaborator

@nickhammond In the time before a new mail gem is released, feel free to put gem 'mail', '2.5.3' in your gemspec; this will prevent it from being upgraded when other gems are released.

@korny
Copy link

korny commented Jun 27, 2013

Great! Can you post here please when it's released? We haven't set up Gemnasium yet…

@nickhammond
Copy link

@ConradIrwin Thanks! Yah, I've specified 2.5.3 in there now so it won't do that. It got bumped when I upgraded Rails but I looked and they specify "~> 2.5.3" for the mail gem so Bundler must've just grabbed the latest.

@korny
Copy link

korny commented Jul 24, 2013

Rails 3.2.14 specifies ~> 2.5.4 now :/ Any chance for a new Gem release soon?

@corasaurus-hex
Copy link

Bump, any word on releasing a newer version?

@0xCCD
Copy link

0xCCD commented Aug 8, 2013

Bump => Same problem, no downgrade possible with Rails 3.2.14

@ejzn
Copy link

ejzn commented Aug 17, 2013

Downgrading also did the trick for me. Glad I was able to find this thread.

@moty66
Copy link

moty66 commented Sep 17, 2013

Same here, downgrade to 2.5.3

Environment:
  Redmine version                2.3.3.stable.12137
  Ruby version                   1.8.7-p302 (2010-08-16) [i486-linux]
  Rails version                  3.2.13

@PowerKiKi
Copy link

Same here, had to workaround this by downgrading to 2.5.3.

This issue impact quite a few of Redmine users according to http://www.redmine.org/issues/13698

@tuupola
Copy link

tuupola commented Nov 11, 2013

Any change of 2.5.5 release?

@paulRbr
Copy link

paulRbr commented Dec 4, 2013

We also had to downgrade to 2.5.3 in our team to make this work.

@jgm
Copy link

jgm commented Dec 4, 2013

It would be great to have a 2.5.5 release. This problem is keeping me from doing rails security updates, since rails 2.3.16 requires mail 2.5.4.

@0xCCD
Copy link

0xCCD commented Dec 4, 2013

+1

@paulRbr
Copy link

paulRbr commented Dec 4, 2013

You can force the version in your lock file for the moment
Em 04/12/2013 19:29, "0xCCD" notifications@github.com escreveu:

+1


Reply to this email directly or view it on GitHubhttps://github.com//issues/548#issuecomment-29831146
.

korny pushed a commit to sofatutor/mail that referenced this issue Jan 6, 2014
This reverts commit 9890b19, as latest
patch releases of 1.8.7 do accept an OpenSSL context object.

This has been broken since the refactoring d6e25e5,
which increased the scope of the original breakage.
@PowerKiKi
Copy link

This bug was fixed 7 months ago, but it still affects users because it was never released. The last release is 9 months old.

Is there anything we could do to make mail 2.5.5 a reality ?

@simondeziel
Copy link

I'd really appreciate if the patch could make it into the next release as we are stuck with ruby 1.8.7 here.

@korny
Copy link

korny commented Jan 29, 2014

One solution: Use our fork.

gem 'mail', '= 2.5.4', :github => 'sofatutor/mail', :branch => '2.5.4-with-fix-548' # see https://github.com/mikel/mail/issues/548

@mikruhland
Copy link

@korny : Thanks a lot for you fork! I was searching along time to get this problem fixed!

@nburwell
Copy link

+1 for a 2.5.5 release that fixes the 1.8.7 bug

@alexparker
Copy link

+1 here too

@neohunter
Copy link

+1

@bf4
Copy link
Collaborator

bf4 commented Oct 25, 2014

Dear commenters: this issue is closed. Please create a new issue with the mail gem version and ruby version you are using (assuming you're using one that has the fix in it).

jeremy pushed a commit that referenced this issue May 22, 2017
This reverts commit 9890b19, as latest
patch releases of 1.8.7 do accept an OpenSSL context object.

This has been broken since the refactoring d6e25e5,
which increased the scope of the original breakage.

Backports c7318a6 to 2-5-stable.

Closes #730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.