redmine: Ocurrió un error al enviar correo (Conexión rechazada - conectar (2))

I'm trying to set up Redmine on Ubuntu 12.04, everything works fine except email notifications.

I'm using Ubuntu 12.04 LTS with latest updates, installed Ruby and Redmine from PPA repositories. The machine was running in VMWare virtual machine.

$ ruby -v
ruby 1.9.3p448 (2013-06-27) [x86_64-linux] Brightbox
$ rails -v
Rails 3.2.13
$ apt-cache policy redmine
  Version table:
 *** 0
        500 precise/main amd64 Packages
        100 /var/lib/dpkg/status
     1.3.2+dfsg1-1ubuntu1 0
        500 precise/universe amd64 Packages

So I'm using Ruby 1.9.3p448 with Rails 3.2.13 and Redmine 2.3.3

I followed the Redmine's guide on setting up SMTP settings in config/configuration.yml como el siguiente:

    delivery_method: :smtp
      address: ""
      port: 25
      authentication: :plain
      domain: ""
      user_name: ""
      password: "pwd"

When I clicked "Send test mail", this error pops up:

An error occurred while sending mail (Connection refused - connect(2))

I'm sure that I can connect to the SMTP server, since I have successfully sent an email with telnet, with PLAIN authentication method. The login and password also checks out. I've also tried to put the configuration under default, production, development in all kinds of combinations, it just won't work.

I've been trying to figure this out for days, I'm new at Ruby/Rails so I'm pretty clueless.

I tried to turn on verbose logging and look at the logs when I send the test email, nothing useful is displayed. The log is a bit too long so I'm gonna post it in pastebin.

I also tried to use TLS/SSL and tried to add options like enable_starttls_auto: true/false, ssl: true/false (and of course changing to the correct port for encryption), nothing helps.

Is it possible that some versions of Ruby or ActionMailer gem might affect this? I followed the Installation Guide on Redmine website to the letter, but still I have this problem.

And FWIW, here's the log when I try to send mail via Rails console:

Errno::ECONNREFUSED: Connection refused - connect(2)
        from /usr/lib/ruby/1.9.1/net/smtp.rb:540:in `initialize'
        from /usr/lib/ruby/1.9.1/net/smtp.rb:540:in `open'
        from /usr/lib/ruby/1.9.1/net/smtp.rb:540:in `tcp_socket'
        from /usr/lib/ruby/1.9.1/net/smtp.rb:549:in `block in do_start'
        from /usr/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
        from /usr/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
        from /usr/lib/ruby/1.9.1/net/smtp.rb:549:in `do_start'
        from /usr/lib/ruby/1.9.1/net/smtp.rb:519:in `start'
        from /usr/lib/ruby/vendor_ruby/mail/network/delivery_methods/smtp.rb:144:in `deliver!'
        from /usr/lib/ruby/vendor_ruby/mail/message.rb:2034:in `do_delivery'
        from /usr/lib/ruby/vendor_ruby/mail/message.rb:229:in `block in deliver'
        from /usr/lib/ruby/vendor_ruby/action_mailer/base.rb:415:in `block in deliver_mail'
        from /usr/lib/ruby/vendor_ruby/active_support/notifications.rb:123:in `block in instrument'
        from /usr/lib/ruby/vendor_ruby/active_support/notifications/instrumenter.rb:20:in `instrument'
        from /usr/lib/ruby/vendor_ruby/active_support/notifications.rb:123:in `instrument'
        from /usr/lib/ruby/vendor_ruby/action_mailer/base.rb:413:in `deliver_mail'
        from /usr/lib/ruby/vendor_ruby/mail/message.rb:229:in `deliver'
        from (irb):17
        from /usr/lib/ruby/vendor_ruby/rails/commands/console.rb:47:in `start'
        from /usr/lib/ruby/vendor_ruby/rails/commands/console.rb:8:in `start'
        from /usr/lib/ruby/vendor_ruby/rails/commands.rb:41:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from script/rails:6:in `<main>'

¡Su ayuda será muy apreciada!

preguntado el 27 de noviembre de 13 a las 07:11

It turns out that the version on PPA somehow doesn't work. I downloaded the 2.4 version of Redmine from official website and re-installed it, everything works now. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.