ActionMailer: "Email delivery error" since version 4.1.1

Added by Nono Nono 5 months ago

Edit 28/05/2020: Adding a fourth error
Dear forum,

I've upgraded my Redmine 3.4.11 to 4.1.1 a week ago and all went fine expect with email notification.
I'm facing an sporadic issue: some emails goes out perfectly, and some others don't, and gave me one of the three four following errors:

[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: SSL_read: wrong version number
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: SSL_connect returned=1 errno=0 state=error: wrong version number
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: Net::OpenTimeout
[ActiveJob] [ActionMailer::DeliveryJob] [xxx] Email delivery error: end of file reached

System information:

$ rvm current
ruby-2.6.0

$ rails --version
Rails 5.2.4.2

$ ruby --version
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]

$ bundle --version
Bundler version 2.1.4

$ uname -r
4.15.0-99-generic

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" 

OpenSSL> version
OpenSSL 1.1.1  11 Sep 2018

$ mysql --version
mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper

database.yml:
production:
  adapter: mysql2

configuration.yml:
delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: xxx
      port: 587
      domain: xxx
      #authentication: :plain
      authentication: :login
      user_name: "xxx" 
      password: "xxx" 
      openssl_verify_mode: 'none'

The "authentication" field was a try (without major changes) found in the only related post I found here: https://redmine.org/boards/2/topics/37326?r=38529#message-38529

Replies (3)

RE: ActionMailer: "Email delivery error" since version 4.1.1 - Added by Marius BALTEANU 5 months ago

Redmine 4.0.0 brings a major change on how the notification emails are sent, please see #26791 for details. After this change, if you don't setup a production ready backend for your queue, you can have issues like this #32314#note-17.

RE: ActionMailer: "Email delivery error" since version 4.1.1 - Added by Nono Nono 5 months ago

Thanks Marius,

Indeed, I must have miss this information / changelog.

As I'm not a redmine/ruby/rails expert, is there any specific 'redmine' documentation or how-to to setup a backend like sidekiq aside this link: https://guides.rubyonrails.org/v5.2/active_job_basics.html#job-execution

I'm really not feeling confortable to edit the redmine code, without the risk to break everything.

The current workaround was to add those lines, before the "end end" in config/application.rb and seems to (slowdown a bit redmine but) works :

config.active_job.queue_adapter = :inline

Note: we are a 10 users redmine instance

RE: ActionMailer: "Email delivery error" since version 4.1.1 - Added by Marius BALTEANU 5 months ago

I have just created a wiki page with the instructions for Ubuntu 18.04, please take a look SideqikConfiguration. The changes are quite safe because you don't need to change the Redmine code, you only change the configuration.

Let us know in #33589 if it works for you.

(1-3/3)