Project

General

Profile

Redmine sending e-mail on Ubuntu

Added by Alexandre Faria Pierini almost 6 years ago

I installed Redmine with Ubuntu 14, but sending auto e-mail does not work.
gives the following message:
E-mail sending is not configured, and notifications are inactive.
Set up your SMTP server in the file /etc/redmine/<instance>/configuration.yml and restart the application to activate them.

I already configured the configuration.yml file in the path given by the message, but it did not work. Can someone help me, the other services is working normally.

Help, please


Replies (7)

RE: Redmine sending e-mail on Ubuntu - Added by Martin Denizet (redmine.org team member) almost 6 years ago

Hello,
Could you please upload here your configuration.yml with sensitive information redacted?
Cheers,

RE: Redmine sending e-mail on Ubuntu - Added by Alexandre Faria Pierini almost 6 years ago

Good afternoon

Of course, follow the configuration.yml

RE: Redmine sending e-mail on Ubuntu - Added by Alexandre Faria Pierini almost 6 years ago

This is the file I tried to configure in the directory: / usr / share / redmine / config

Please, if you can help, thank you.

RE: Redmine sending e-mail on Ubuntu - Added by Martin Denizet (redmine.org team member) almost 6 years ago

Several mistakes in the file:
Overlapping conf: you got several block initiating email delivery:
 production:
   email_delivery:

I consider you un-commented these by mistake and that your actual conf is this block:
[shell]
production
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :sendmail
    smtp_settings:
      address: email-ssl.com.br
      port: 465
      ssl: true
    domain: mairinque.sp.gov.br
      authentication: :login
      user_name: "suporte@mairinque.sp.gov.br" 
      password: "sistemaspadrao" 
      enable_starttls_auto: true    
[/shell]

I see 4 problems here:
  1. It starts production then default, I'd be surprised if the file was not already broken there
  2. The [shell] tags, I've no idea what they do here.
  3. delivery_method is set to :sendmail but you configure a SMTP service right bellow. SMTP settings are needed only if your delivery method is set to :smtp. Personally, I prefer to use sendmail but it assumes you have a MTA such as exim configured to deliver your mail. It doesn't seem to be what you are trying to do here.
  4. domain: property is indented with a TAB instead of spaces, that's a big no-no that breaks a YAML file. Assuming you're using Windows, edit YAML files with Notepad++ with Show All Characters options enabled.

I'd correct the file as bellow:

-[shell]
-production
-default:
+production: #Only production environment should need to send emails
  # Outgoing emails configuration (see examples above)
  email_delivery:
-    delivery_method: :sendmail
+    delivery_method: :smtp
    smtp_settings:
      address: email-ssl.com.br
      port: 465
      ssl: true
-    domain: mairinque.sp.gov.br
+      domain: mairinque.sp.gov.br
      authentication: :login
      user_name: "suporte@mairinque.sp.gov.br" 
      password: "sistemaspadrao" 
      enable_starttls_auto: true    
-[/shell]

Attached, the modified file (started from a new default file).

A few more notes:
  • Having ssl: true and enable_starttls_auto: true both enabled may not make sense, to test
  • From the path you gave, it seems like you installed Redmine using your distro's packages. I tried once and the actual configuration files for my instance were not where where I expected them

Cheers,

configuration.yml (8.3 KB) configuration.yml File modified

RE: Redmine sending e-mail on Ubuntu - Added by Alexandre Faria Pierini almost 6 years ago

Martin

Thanks, I'm going to modify the file according to the suggestion;
I'll let you know if it worked.

RE: Redmine sending e-mail on Ubuntu - Added by Alexandre Faria Pierini almost 6 years ago

Hi , I made all the changes necessary but nothing work.
The impression we have, Ubuntu not recognize the archive configuration.yml.
I need to know if exists other way to configure Ubuntu. The archive need to stay in a determinated directory?Each one ?

RE: Redmine sending e-mail on Ubuntu - Added by Alexandre Faria Pierini almost 6 years ago

Hi.
We made some modifications, and found that the configuration.yml file was in the wrong place. Fixed this, redmine finds the file now. However when doing the test of sending of email it returns the following message:
There was an error sending the email (execution expired)

We believe there is some configuration error in the configuration.yml file.
Could you help us with this setup?
Attached, the modified file.

    (1-7/7)