Redmine 2.0: error sending email

Added by Paolo Andreuzza over 5 years ago

Hi.

Redmine 2.0 can't send email.

When I try Administration > Settings > Email Notification > Send a test email I obtain the following error:

 "An error occurred while sending mail (SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A)" 

Redmine is installed on a Debian squeeze virtual machine, apache2 serve redmine pages via mod_passenger.

I added in redmine/config/configuration.yml the following lines:

# specific configuration options for production environment
# that overrides the default ones
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
     address: 172.xx.xx.xx     <- ip addr of my local network smtp server, no auth required
     port: 25
     domain: :none
     autentication: :none

Whith Redmine 1.3 on Ubuntu virtual machine, same configuration works correctly.

Sorry for my english
Thank in advance.
P.

Replies (19)

RE: Redmine 2.0: error sending email - Added by Peter F over 5 years ago

Hi I have the same problem in 1.2.1 mail send correct. After update to 2.0 i have problem with sending mail :( but I don't have any error :|

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "mail_host.com" 
      port: 587
      domain: "mail_host.com" 
      authentication: :login
      user_name: "info@mail_host.com" 
      password: "password" 

RE: Redmine 2.0: error sending email - Added by Paolo Andreuzza over 5 years ago

Some more infos about my installation:

Environment:
  Redmine version                          2.0.0.stable
  Ruby version                             1.8.7 (i486-linux)
  Rails version                            3.2.3
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  redmine_wiki_extensions                  0.4.1

If you need something else please, ask me. I have no idea about these issue.
Thank you

EDIT: I tried this http://www.redmine.org/boards/2/topics/30883?r=30918 but I havn't noted any change in behavior

P.

RE: Redmine 2.0: error sending email - Added by Peter F over 5 years ago

I solved my problem with "hostname was not match with the server certificate":

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "domena.com.pl" 
      port: 587
      domain: "domena.com.pl" 
      authentication: :login
      user_name: "info@domena.com.pl" 
      password: 'haslo'
#      enable_starttls_auto => false
      openssl_verify_mode: 'none' # <-- add this line

RE: Redmine 2.0: error sending email - Added by Jean-Michel G over 5 years ago

Great, it finally works for me too!

RE: Redmine 2.0: error sending email - Added by Paolo Andreuzza over 5 years ago

Hi guys.
I've upgraded my installation to version 2.0.2, but my problem is still there. I've even tryed "open_ssl_verify_mode => none" in configuration.yml with no success (as I've written above).
I don't know ruby at all so I have no idea on where to look for.
I think it's not a Redmine problem, but something is missing in my installation, but i don't know what. Can somebody give me a suggestion?

Thank in advance.

RE: Redmine 2.0: error sending email - Added by David Hull about 5 years ago

I got e-mail to work by adding:

      openssl_verify_mode: 0
      authentication: :none

RE: Redmine 2.0: error sending email - Added by Paolo Andreuzza about 5 years ago

Thank you, I've try but nothing to do, I obtain always the same error, and non email is sent.
Maybe I've a problem elsewhere but I've no idea...
I've even tried to send an email manually, using telnet from my redmine machine, and it works, it means it isn't a network/server issue...

RE: Redmine 2.0: error sending email - Added by Delbert Friesen about 5 years ago

Great, it works for me too. My configuration file is:

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: 192.168.x.x # IP Mailserver
      port: 25
      domain: "domain.com" # my mail domain
      authentication: :none
 #     user_name: "" 
 #     password: "" 
 #     enable_starttls_auto: true
      openssl_verify_mode: 'none'

I had to restart my redmine stack after editing my configuration.yml

/etc/init.d/bitnami restart

RE: Redmine 2.0: error sending email - Added by Pierre Labrie about 5 years ago

The two configurations works for the error:
Erreur lors de l'envoi de l'email (hostname was not match with the server certificate)

openssl_verify_mode: 0
or
openssl_verify_mode: 'none'

Of course you have to restart the server.(Thin on Bitnami)

Redmine 2.1.2 on Bitnami

RE: Redmine 2.0: error sending email - Added by Dhia Eddine almost 5 years ago

thanks
openssl_verify_mode: 'none' # <-- add this line
worked for "hostname was not match with the server certificate" error
with Environment:
Redmine version 2.1.4.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.8
Environment production
Database adapter MySQL
Redmine plugins:
no plugin installed

RE: Redmine 2.0: error sending email - Added by dejan dudukovic almost 5 years ago

Jean-Michel G wrote:

Great, it finally works for me too!

Thx I install redmine version 2.2 on debian with apache 2 and passenger

when I added openssl_verify_mode: 'none' on my config email file everything work good .
thanks a looten I added openssl_verify_mode: 'none' on my conflig email file everything work good .
thanks a loot

RE: Redmine 2.0: error sending email - Added by Alain JUPIN over 4 years ago

Hello,

I've a Redmine 2.1.5 running on Debian Squeeze with apache 2 and mod_passanger.

In the config/configuration.yml, I've the followings :

default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: localhost
      port: 587
      domain: "domain.com"       # <- replaced by my true domain
    authentication: :none
    enable_starttls_auto: false
    openssl_verify_mode: 'none'

I've tried with port 25 and 587, and also tried domain: "localhost"

I restart redmine (after each modifications) by restarting apache2.
This doesn't resolve the "hostname was not match with the server certificate" issue when send test email !

I also try to use smtp.gmail.com, this doesn't solve the problem.

Environment:
  Redmine version                          2.1.5.stable
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  no plugin installed

Thanks a lot for your help

RE: Redmine 2.0: error sending email - Added by Pierre Labrie over 4 years ago

You must restart the rail server (Thin), not the Apache. The Apache receive the content from the rail server. On Bitnami stack, there are two Thin server on a load balancing configuration. Each one must be restarted after a modification of the config/configuration.yml or after adding a plugin.

I think the command is thin restart -C /etc/thin/myapp.yml on linux but I use a windows version on a Bitnami stack. See also http://stackoverflow.com/questions/7841653/how-to-restart-individual-servers-in-thin-cluster-in-rails-3-1-app

RE: Redmine 2.0: error sending email - Added by Anry Kischka over 4 years ago

Hi! Please help me!
My server:
Environment:
Redmine version 2.3.0.stable
Ruby version 1.8.7 (amd64-freebsd9)
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
no plugin installed
FreeBSD 9.0

My conf file:
@default: # Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: localhost
port: 587
domain: mail.hostname.su
authentication: :plain
user_name: ""
password: "password"
openssl_verify_mode: 'none'
@
and when I try send test email, I have error (wrong argument (Fixnum)! (Expected kind of OpenSSL::SSL::SSLContext))
How to fix it?!?

RE: Redmine 2.3: error sending email - Added by BTR Naidu over 4 years ago

Having tried all the above, I now have the error

An error occurred while sending mail (wrong argument (Fixnum)! (Expected kind of OpenSSL::SSL::SSLContext))

I have upgraded from redmine 2.1.x to 2.3.x and using gmail as my smtp server.

RE: Redmine 2.0: error sending email - Added by Luis Morales over 4 years ago

I have the same issue. On 2.3.1 not work send email over gmail.

Environment:

  Redmine version                          2.3.1.stable.11900
  Ruby version                             1.8.7 (i686-linux)
  Rails version                            3.2.13
  Environment                              production
  Database adapter                         MySQL
  Redmine plugins:
    no plugin installed

The system show me this error:

An error occurred while sending mail (wrong argument (Fixnum)! (Expected kind of OpenSSL::SSL::SSLContext))

My email setup:

  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true  
      address: "smtp.gmail.com" 
      port: '587'
      domain: "gmail.com" 
      authentication: :plain
      user_name: "user@gmail.com" 
      password: "********" 

RE: Redmine 2.0: error sending email - Added by Luis Morales over 4 years ago

Solve it on redmine version (2.3.1.stable.11903). So i reinstall redmine and work fine. I not sure if the problem was on ruby or passsenger version.

Here the details:

Environment:

OS:
  Ubuntu-Server 12.04.2 LTS x86

Apache:
  Apache/2.2.22 (Ubuntu) 
  PHP/5.3.10-1ubuntu3.6 with Suhosin-Patch 
  mod_fcgid/2.3.7 
  Phusion_Passenger/4.0.3

Redmine version: 2.3.1.stable.11903
Ruby version: 1.9.3 (i686-linux)
Rails version: 3.2.13
Environment: production
Database adapter: Mysql2

Mysql:
  5.5.31-0ubuntu0.12.04.1 (Ubuntu)

Rails:

ruby 1.9.3p429 (2013-05-15 revision 40747) [i686-linux]
gem 1.8.25
Rails 3.2.13

Gems Pack:

actionmailer (3.2.13)
actionpack (3.2.13)
activemodel (3.2.13)
activerecord (3.2.13)
activeresource (3.2.13)
activesupport (3.2.13)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.3.5)
coderay (1.0.9)
daemon_controller (1.1.4)
erubis (2.7.0)
fcgi (0.9.1)
hike (1.2.2)
i18n (0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.0, 1.5.5)
mail (2.5.4)
mime-types (1.23)
minitest (2.5.1)
multi_json (1.7.3)
mysql2 (0.3.11)
net-ldap (0.3.1)
passenger (4.0.3)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
railties (3.2.13)
rake (10.0.4, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
rmagick (2.13.2)
ruby-openid (2.1.8)
sprockets (2.2.2)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.12)
tzinfo (0.3.37)

Gmail setup:

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: "user@gmail.com" 
      password: "******" 

RE: Redmine 2.0: error sending email - Added by Tomas Latal over 4 years ago

Problem still occures, I have this configuration

Redmine version                          2.3.1.stable.11984
Ruby version 1.8.7 (i486-linux)
Rails version 3.2.13
Environment production
Database adapter PostgreSQL

and testing email still says

(wrong argument (Fixnum)! (Expected kind of OpenSSL::SSL::SSLContext))

my configuration.yml

email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: smtp.gmail.com
port: 587
domain: smtp.xxxxxxx.com
authentication: :plain
user_name: ""
password: "xxxxxxxxxxx"

Anybody got any working solution?

RE: Redmine 2.0: error sending email - Added by Tomas Latal over 4 years ago

Finally!! Downgrading to mail 2.5.3 and changing dependency in Gemfile.lock from mail 2.5.4 to 2.5.3 worked for me.

(1-19/19)