Mails sent by redmine received in SPAM folder

Added by Vishal Mehta about 7 years ago

Mails which are sent by Redmine using the email id provided in email.yml file (Gmail id here), are received by gmail in SPAM folder.

At the header, it shows a text "This message may not have been sent by: Learn more Report phishing"

The steps provided in https://support.google.com/mail/bin/answer.py?hl=en&answer=22370 are applicable to already existing clients. But there is no such client in Redmine.

Has anyone of you resolved this issue? It'll help to know the solution where the user does not see such headers nor does it go into their SPam folder

Replies (17)

RE: Mails sent by redmine received in SPAM folder - Added by William Roush about 7 years ago

What is the contents of your email.yml file (don't forget to strip any passwords)?

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Hi William,

Contents of email.yml:
production:
delivery_method: :smtp
smtp_settings:
tls: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :login
user_name: ""
password: "password"

I am using redmine 0.9.3.1 on Ubuntu 10.04
Should also mention here, in Redmine's interface -> Administration -> Settings -> Email Notifications -> Emission email address, I have provided the value as

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

Could you post the full message (i.e. with headers - dont forget to strip out the address/ip/domains)?

In Gmail, you can view the full message using the drop-down at the top-right corner of the message, click "Show original".

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

This is the header

Delivered-To: user1@gmail.com
Received: by IPAddress1 with SMTP id b27csp120783anq;
Tue, 17 Jul 2012 10:43:18 -0700 (PDT)
Received: by IPAddress2 with SMTP id bq6mr4540781obc.78.1342546998609;
Tue, 17 Jul 2012 10:43:18 -0700 (PDT)
Return-Path: <*emailid_in_email.yml*@gmail.com>
Received: from rackspace_server_name (rackspace_IP_address.static.cloud-ips.com. [*rackspace_IP_address*])
by mx.google.com with ESMTPS id d7si18920464oea.57.2012.07.17.10.43.18
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 17 Jul 2012 10:43:18 -0700 (PDT)
Received-SPF: neutral (google.com: rackspace_IP_address is neither permitted nor denied by domain of emailid_in_email.yml@gmail.com) client-ip=*rackspace_IP_address*;
Authentication-Results: mx.google.com; spf=neutral (google.com: rackspace_IP_address is neither permitted nor denied by domain of emailid_in_email.yml@gmail.com) smtp.mail=*emailid_in_email.yml*@gmail.com
Received: from localhost.localdomain (localhost [127.0.0.1])
by rackspace_server_name (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id q6HHhGNA030354;
Tue, 17 Jul 2012 17:43:16 GMT
Date: Tue, 17 Jul 2012 17:43:16 +0000
From: emailid_in_email.yml@gmail.com
To: user1@gmail.com, user2@gmail.com
Cc: user3@gmail.com
Message-Id: <>
Subject: Subject
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=mimepart_5005a434e75ec_760a3fc28f7e61ac1fd
X-Redmine-Issue-Id: 2
X-Mailer: Redmine
X-Redmine-Host: rackspace_IP_address/redmine
Precedence: bulk
X-Redmine-Site: Redmine Header
X-Redmine-Issue-Assignee: user2
Auto-Submitted: auto-generated
X-Redmine-Project: proto
X-Redmine-Issue-Author: user1

I am using Rackspace to host this cloud on which Ubuntu 10.04 is installed. Redmine 0.9.3.1 installed on that.
The email address configured in email.yml and email address configured in the Redmine Email notification settings are the same emailid_in_email.yml@gmail.com

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

Weird, looks like Redmine is using the local SMTP server on your Rackspace instance.
I think email.yml will be deprecated in favor of configuration.yml. Maybe something in configuration.yml is overriding your config.
Try to move your settings to configuration.yml (the production part is at the bottom):

production:
  email_delivery:
    #your settings from above

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Thank you for the response Patrick. In the redmine instance I have installed, there is no configuration.yml file (nor was there any configuration.example.yml file)

email.yml was also not there and rather I had to create it. I'll still try copying email.yml to configuration.yml and see what happens

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

Weird. Which version are you using? The configuration files are located within config/ - did you make your changes in there?

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Eeeks!
Copying email.yml into configuration.yml brings about 'Internal Errors' when clicking on Settings under Administration!

I guess 0.9.3.1 version does not support a configuration.yml file!

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Yes Patrick.. checked in the same /<redmine instance>/config folder

Redmine - 0.9.3.1
Ubuntu - 10.04

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

configuration.yml was introduced with 1.2, so yeah, that won't work.
One more thing: is the indentation of your yaml file correct (i.e. two space characters)? YAML uses significant whitespace.
It should look like this:

production:
  delivery_method: :smtp
  smtp_settings:
    address: smtp.example.net
    port: 25
    domain: example.net
    authentication: :login
    user_name: "redmine@example.net" 
    password: "redmine" 

If that's not the problem, I'd start by updating the Redmine installation to 1.4 or 2.0, maybe the issue has been fixed already.

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Yeah that has been fixed. The original problem though is not of an email not being sent. I am able to receive the email, so are the other users.

But just that how do I avoid them getting into SPAM boxes

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

The reason why the emails end up in Spam is that Redmine is using your local SMTP server instead of the smtp server you supplied in the email.yml file. Redmine probably defaults to using the local SMTP server/sendmail, that's why the emails are getting sent at all.
Two more ideas: Are you, by any chance, not running in production environment (not very likely)?
Also, check the file permissions of email.yml - maybe Redmine isn't allowed to read that file.

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

Ummm... This is something I am not aware of how to check.
I see only root user in file permissions for email.yml.
Is the Redmine user identified by redmine?

And how do I check if I am actually running in production?

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

That depends on your deployment. It's probably www-data on Ubuntu. You could just chmod 0777 your email.yml (just temporary!) to check whether it's a permission problem and if that's the case chown to www-data (or whatever user redmine is running on your installation).

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

I got an internal error on changing the ownership when going to Redmine - Administration - Settings. This often happens on changing the configuration!

I actually tried to configure gmail in redmine 2.0 in ubuntu 12.04 but it failed miserable, the reason for my downgrade to ubuntu 10.04 and redmine 0.9

I still have the liberty to re-install 12.04 and redmine 2.0
Sorry to ask this but do you have a link or set of instructions which can help in doing so? (Its easy to install redmine but what is difficult is to configure configuration.yml in that to get the gmail running!)

RE: Mails sent by redmine received in SPAM folder - Added by Patrick Figel about 7 years ago

Please post your production log so we can see what's causing the internal error (log/production.log on 2.0).

RE: Mails sent by redmine received in SPAM folder - Added by Vishal Mehta about 7 years ago

No log directory in either /usr/share/redmine nor in /var/www/redmine
Directory /var/log/redmine has only a default 'directory' which cannot be cd-ed to!

(1-17/17)