Project

General

Profile

Receiving emails - Exchange 2003

Added by Julio Lacayo about 14 years ago

I'm running Redmine using the BitNami stack on a Windows Server 2003 (Standard edition).

I have not found any guides about setting up Redmine to create tickets (issues) from emails coming from an Exchange (2003) server.

I did find some documentation about receiving email in general
http://www.redmine.org/wiki/redmine/RedmineReceivingEmails

*Forwarding emails from your email server¶
A standalone script can be used to forward incoming emails from your mail server.
This script reads a raw email from the standard input and forward it to Redmine via a HTTP request.
It can be found in your redmine directory: extra/mail_handler/rdm-mailhandler.rb.

In order to use it, you have to enable the API that receive emails:
Go to Application settings -> Incoming emails, check Enable WS for incoming emails and enter or generate a secret key.

Copy rdm-mailhandler.rb to your mail server, make sure its permissions allow execution, and configure your MTA.*

However, this requieres using *.rb files which my Exchange server does not understand.

If anyone reading this has experience making this work with Exchange, or if anyone can point me to to where I can find guidance, I would truely appreciate your help with this matter.

Thanks


Replies (11)

RE: Receiving emails - Exchange 2003 - Added by Felix Schäfer about 14 years ago

Use the IMAP method, i.e. a cron periodically fetches mails from IMAP, which IIRC exchange can serve.

RE: Receiving emails - Exchange 2003 - Added by Julio Lacayo about 14 years ago

Hello Felix, and thank you for the input.
I don't think cron jobs run on Windows.
What would you recommend on terms of scripting a job for Redmine running on Windows Server 2003?
And what exactly would I need to configure?
Thanks

RE: Receiving emails - Exchange 2003 - Added by Felix Schäfer about 14 years ago

I don't know windows, so I can't tell you much, but "all" you need to do is call the /path/to/rake with the correct options for the IMAP stuff (there should be a tutorial for that too) at say 5 minutes interval. Windows can do that, you just need to throw the rake call in a batch file, and create a windows service (or whatever it was called) to run that batch file every 5 minutes.

RE: Receiving emails - Exchange 2003 - Added by Julio Lacayo about 14 years ago

Felix, thanks again.
I see the light at the end of the tunnel. This gives me the general idea of what needs to be done.
I don't know Redmine yet, this is my first time using it, finding a five minute tutorial on doing this would be great.
I've searched the usual suspects (i.e. google, Experts-Exchange, this forum, etc...), but so far I have not found more concrete, detail directions.
Again, if you or anyone else can point me in the right directions....
Thanks again.
-Julio

RE: Receiving emails - Exchange 2003 - Added by Simon Z about 14 years ago

We use the following script to fetch email from Exchange 2003 via the IMAP protocol.
A Scheduled task is setup to run the script every five minutes. We are running Redmine 0.8.4.

Fetch_imap.bat

@echo off

echo Fetch general Redmine mails
call rake redmine:email:receive_imap RAILS_ENV="production" host=yourexchangeserver username=username@yourdomain.com password=yourpassword project=nameofyourprojectwhereissueshouldbecreated tracker=bug allow_override=project

RE: Receiving emails - Exchange 2003 - Added by Julio Lacayo about 14 years ago

Hello Simon,
I ran the bat file modified for our environment.

@@echo off

echo Fetch general Redmine mails
rake redmine:email:receive_imap RAILS_ENV="production" host=mail.ourdomain.com username= password=XXX unknown_user=create project=help tracker=support allow_override=priority --trace@

I get the following back:

Fetch general Redmine mails
(in C:/Program Files/BitNami Redmine Stack/apps/redmine)
  • Invoke redmine:email:receive_imap (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_imap

But nothing is created in my project. The name of my project is "GQRR Helpdesk" and its identifier is "help"

Any and all help is appreciated.

Thanks,
-Julio

RE: Receiving emails - Exchange 2003 - Added by Simon Z about 14 years ago

It might be that the email is already read. Connect to the account with an Outlook client and mark all the messages unread.

/Simon

RE: Receiving emails - Exchange 2003 - Added by Julio Lacayo about 14 years ago

Thanks, that was the issue.
Now I have a separate issue.
I've changed the general option "unknown_user" from "create" to "accept".
Before, when set to "create" it indeed created a new user using its email address as its logon ID. We do not want this.
I still want to capture the issue, but I don want to create a new user for unknown users. Thus the change.
However, now the users are not being created and the issues are not being reported.
Any thoughts?
here is the bat file being used:

@echo off

echo Fetch general Redmine mails
rake redmine:email:receive_imap RAILS_ENV="production" host=mail.ourdomain.com username=username@ourdomain.local password=ourpassword unknown_user=accept project="help" tracker=support allow_override=project,priority

Thanks in advance

RE: Receiving emails - Exchange 2003 - Added by Simon Z about 14 years ago

Sorry, we haven't needed this kind of scenario. Also we use redmine 0.8.4 and this was not implemented at that time I believe.

Remember that the issues might have been read this time too.

/Simon

RE: Receiving emails - Exchange 2003 - Added by Felix Schäfer about 14 years ago

I don't think there's a built-in way to retain sender information without creating an account for her/him.

RE: Receiving emails - Exchange 2003 - Added by Julio Lacayo about 14 years ago

Redmine allows the creation of entries by an "Anonymous" author.
This function is now working.
I'm not sure why it was not working before, but it is working now.
Thanks

    (1-11/11)