Configure gmail for Redmine on ubuntu

This guide will help you configure Redmin for use with gmail when running on ubuntu 11.10. First follow the Redmine installation guide for ubuntu. For Ubuntu 11.10 use the first URL. For other installations check the second URL. .

Don’t forget to use the optimalisation settings. If you do so you can also set the environment file you’ll need later on. To edit the configuration of your Redmine installation on apache web server run:

sudo vi /etc/apache2/sites-available/default

I didn’t get the Passenger optimalisation properties to work since I didn’t follow the guide for ubuntu 11.10 installation.

Then we need to configure Redmine to use your gmail account. For this will have to install an .rb file in the lib directory. Install curl to get the file using:

sudo apt-get install curl

Next navigate to the lib directory of your Redmine installation, default location is /usr/share/redmine and there fetch the script. Copy the URL to the raw file from to use instead of URL_TO_RAW_FILE in the following command:

cd /usr/share/redmine/lib
sudo curl URL_TO_RAW_FILE
sudo mv 44466 smtp_tls.rb

Update production.rb file (or whatever environment you’re on) for use with gmail. This file is located at /usr/share/redmine/config/environments/production.rb . This is where we point to this new file in the lib directory.


# No email in production log
config.action_mailer.logger = nil

# TLS for Gmail SMTP
require 'smtp_tls'

Finally update the email.yml file to match your gmail settings. For me this file was located at /etc/redmine/default/email.yml and this was the required content:

delivery_method: :smtp
port: 587
authentication: :login
password: XXXXXXXX

Now you’re ready to restart Redmine for the changes to take effect

sudo /etc/init.d/apache2 restart

If you’re done with that you can go to your Redmine installation using your browser. Login with an admin account and go to Administration > Settings selecting the tab Email notifications. This is where you can configure what you want to use the notifications for. At the bottom there is also a link to send a test e-mail.

So you’ re done. The resources I used:

Leave a Reply

Your email address will not be published. Required fields are marked *

Please reload

Please Wait