Project

General

Profile

Actions

Patch #8257

closed

Proposal for supporting project-specific wildcard addresses in default mail handler

Added by Marcus Ilgner about 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
-
Start date:
2011-04-30
Due date:
% Done:

0%

Estimated time:

Description

While I saw that there's a python script to support project-specific email address extensions, I propose a simple change to the default Ruby mailhandler script. The python script exited with some error message I couldn't quite follow and anyway chaining two scripts seemed to be somewhat inefficient to me.
I just hacked this the quick and dirty way, so the regex is a bit rough around the edges, but it should do the job. At least it's working great on my setup.

123c123,124
<     
---
>     m = email.match(/To: .*<.*-(.*)@/)
>     issue_attributes['project'] = m[1] unless m.nil?

This will automatically assign any mail to redmine-[yourproject] to the project [yourproject].

I thought about extending it even further so that one can write mails to redmine-yourproject-feature to have it assign the ticket to the 'feature' tracker.


Related issues

Related to Redmine - Patch #20732: MailHandler: Select project by subaddress (redmine+project@example.com)ClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF