February 20 2012

Setting up Redmine on Windows Server 2008 with email via Exchange

In this post I'll describe how to install Redmine on Windows Server 2008, and configure it to receive email from Exchange server.

Redmine is an awesome project management and bug tracking tool, it's extremely easy to use and best of all, it's free!


Installing Redmine on Windows

The first thing to do is download the Redmine Stack from BitNami (http://bitnami.org/stack/redmine). This installs Redmine and all of it's dependencies in just a few clicks.


Sending email notifications from Redmine

To configure email notifications login to redmine and go to Administration -> Email notifications. Set the "Emission email address" field to the email address that you want notifications to be sent from.

If you're sending email from redmine using a local SMTP server that doesn't require authentication, you need to edit the configuration.yml file located at "C:\Program Files\BitNami Redmine Stack\apps\redmine\config\configuration.yml". Below the line "Outgoing emails configuration", comment out the following lines like so:

#authentication: :plain
#user_name: ""
#password: ""


Receiving email into Redmine from Exchange Server

To enable incoming email login to redmine and go to Administration -> Incoming emails. Click the "Generate a key" link and check the "Enable WS for incoming emails" checkbox, then click Save.

To receive email from Exchange, create a batch file in the folder "C:\Program Files\BitNami Redmine Stack\apps\redmine" with the following commands:

@echo off

echo Fetch general Redmine mails

CALL C:\PROGRA~1\BITNAM~1\scripts\setenv.bat
CALL rake redmine:email:receive_imap RAILS_ENV="production" host=[MAIL SERVER] username=[USERNAME] password=[PASSWORD] project=[DEFAULT PROJECT] tracker=bug allow_override=project

Then create a scheduled task to execute the batch file every 5 minutes (or however often you like).


Integrating Redmine with Subversion

Finally, if you'd like to integrate redmine with subversion, or you've tried and are receiving the error "The entry or revision was not found in the repository". You need to modify the subversion_adapter.rb file located at "C:\Program Files\BitNami Redmine Stack\apps\redmine\lib\redmine\scm\adapters\subversion_adapter.rb". Look for the line:

str << " --no-auth-cache --non-interactive"

And replace it with:

str << " --no-auth-cache --trust-server-cert --non-interactive"

Sponsored by