Ruby - Redmine 3.0.3

178 Views Asked by At

My redmine works fine. But, the e-mail notification is not working.

Im using:

Environment:
Redmine version 3.0.3.stable
Ruby version 2.2.2-p95 (2015-04-13) [x86_64-linux]
Rails version 4.2.1
Environment production
Database adapter Mysql2
SCM:
Filesystem
Redmine plugins:
no plugin installed

configuration.yml:

default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
    address: "smtp.bsservices.com.br"
    port: 587
    domain: "smtp.bsservices.com.br"
    authentication: :login
    user_name: '<user>@bsservices.com.br'
    password: '<password>'
    openssl_verify_mode: 'none'

Error:

(Permission denied - connect(2) for "smtp.bsservices.com.br" port 587)

Error 2:

App 6529 stderr: Saving attachment '/var/www/redmine/files/2016/12/161223114939_app_creator.PNG' (79469 bytes) App 6529 stderr: Completed 500 Internal Server Error in 18ms (ActiveRecord: 2.5ms) App 6529 stderr: App 6529 stderr: Errno::EACCES (Permission denied @ rb_sysopen - /var/www/redmine/files/2016/12/161223114939_app_creator.PNG): App 6529 stderr: app/models/attachment.rb:109:in initialize' App 6529 stderr: app/models/attachment.rb:109:inopen' App 6529 stderr: app/models/attachment.rb:109:in files_to_final_location' App 6529 stderr: app/controllers/attachments_controller.rb:90:inupload'

I already gave all permissions (777) to the folder.

Any help?

1

There are 1 best solutions below

2
On

The root cause of the issue is that Redmine can't connect to the mail server to actually send the mails. This can have one of multiple causes:

  • It might be you have SELinux enabled on your OS but have not granted Redmine permission to connect to the smtp server. You could try to disable SELinux to verify this theory.
  • It could be your server is only accessible via IPv6 and thus can't access the smtp server with its IPv4 address.
  • There could be anti-virus or firewalls preventing Redmine to access the smtp server