Thierry
Thierry

Reputation: 1

Redmine email notifications through Gmail

I've upgraded from Redmine 1.3.2 to 2.4.2 when changing the server (moving to Ubuntu 14 from 12) and managed to restore my old database, so I'm now having all my data back. But I still can't get email notifications to work. After looking around quite a bit I can't find any pointers.

When I send a test mail form Redmine's settings page I get the message:

Erreur lors de l'envoi de l'email (SSL_connect returned=1 errno=0 state=unknown state: unknown protocol)

The configuration.yml looks fine as far as I can tell from what I've read on multiple sources (I checked and there's no tab in it):

default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      openssl_verify_mode: 'none'
      address: "smtp.gmail.com"
      port: 587
      domain: "smtp.gmail.com"
      authentication: :plain
      user_name: "xxxxxx@yyyyyy"
      password: "password"

Whether I use "default" or "production" block makes no difference, same with "openssl_verify_mode" whether present or not (and I do the restart the apache2 service each time).

Redmine log file (production.log) is not helping much even with

log_level= :debug

as it doesn't show what's actually wrong with sending the mail (it shows the mail content but that's it). Like on many posts asking about this my setting was fine with Redmine 1.3. From what I read Redmine uses Action mailer so there's no need to install and setup any mail server (mail, postfix, etc), right?

As I'm going in loops (again), I'd be grateful to get some pointers.

Thanks,

Upvotes: 0

Views: 1664

Answers (3)

SimonY
SimonY

Reputation: 21

Here is another article saying gmail and other webmail get blocked... https://www.mailjet.com/blog/news/dmarc-gmail-changes/

There doesnt seem to be any simple Free email solutions documented for Redmine. My easy solution to getting Redmine email to work is using a SMTP service provider such as Mailjet, Mailgun, Sendgrid, etc. Some of these SMTP service providers offer their service for Free up to 12,000 Free emails/mo. or more. All you have to do is sign up for one of these services, have SSH access to your Redmine setup, and edit the configuration.yml file at /opt/bitnami/apps/redmine/htdocs/config/ to reflect something like below. Using Mailjet as an example...

delivery_method: :smtp
smtp_settings:
  enable_starttls_auto: true
  address: "in-v3.mailjet.com"
  port: 587
  domain: 'enter your domain here'
  authentication: :plain
  user_name: 'enter your master api key here'
  password: 'enter your secret key here'

Save the configuration.yml file and restart redmine with "sudo /opt/bitnami/ctlscript.sh restart" without quotes.

Thats all! Real easy.

Upvotes: 2

SimonY
SimonY

Reputation: 21

I was able to get Redmine to login to Gmail to send Redmine Notifications, but those notifications stop at Gmail and never gets to the recipient. This is evident as all notifications were recorded in my "Sent Mail" box but those emails never get to my separate Redmine Admin email account. I believe Google closed ports 25, 465, and 587 for Apps so the solution then would be to use another email provider, service, or G Suite mail. My conclusion is also based on information from Google Cloud https://cloud.google.com/compute/docs/tutorials/sending-mail/

Upvotes: 0

Erdi Gürbüz
Erdi Gürbüz

Reputation: 74

Try this. Maybe it can help. Redmine 3.2.3-2

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:

      address: smtp.gmail.com
      port: 587
      domain: smtp.gmail.com
      authentication: :login
      user_name: [email protected]
      password: pass

Upvotes: 0

Related Questions