Jira mail handler for multiple projects

markstocker January 27, 2013

I have setup an Incoming Mail sever using POP and have an account that I've entererd in the user name and password fields called - JiraEmailSvc and a mailbox has been created for the user - JEmail@aaaaa.com

The Test Connection works.

I then setup a new mail handler to create an issue on new email message. In the Name field I have put JEmail@aaaaa.com sent an email to that address, clicked the Test button and it creates a new Jira in the project, good that works!

Here comes the problem, I'm now trying to setup another project with a different email address. This one is test@aaaaa.com, I go through a new mail handler to create on new email message again. In the name field I put test@aaaaa.com and on the next screen I choose my new project. Click Test and it says there are no emails.

I've been back and the account I've used to setup the Incoming Mail Server (JiraEmailSvc) now has access to both JEmail@aaaaa.com and test@aaaaa.com mailboxes but am I doing this right or have I got this setup all wrong?

Ideas appreciated!

Thanks

Mark

3 answers

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

The email handlers are done in two parts. There's a connection to a mailbox to fetch email from, and then there's a handler which reads the mail box.

It sounds like you've got one mailbox connection (with two emails incoming), but two handlers. I'm not sure that is going to work as well as it should.

Could you go to system -> incoming mail and post what you've got there?

(As an aside, I think you can make your setup work by installing JEMH which is immensely more powerful for handling email, but let's just make sure we understand your current setup properly first)

Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2013

Mulitple mailboxes are fine, to a point, if you have <10, you can create new default maill handlers for each new inbound mailbox.

But, once numbers grow, your system will spend more and more time polling. If you have one mailserver, it will become overloaded and your JIRA will lag. Then, you will need to look to a different approach. JEMH can in the case given, with one checkbox, map your 'JEmail' and 'test' to projects in JIRA of the same text, as well as other address based mappings if that didn't work for you. Agree with Nic, figuring out what your operating parameters are (now and the future) will guide responses...

markstocker January 28, 2013

Hi again

So firslty, I'm only trying to do this for 2 projects so taking your feedback so far I now have 2 POP servers listed on the Incoming Mail setup - 1 for Legal and 1 for Compliance. The Test works for both.

Next I setup an email handler for each using the - Create a new issue from each email message. I test that and it works.

Now I want to setup an email handler for each so that users can reply to the emails, using the - Add a comment before a specified marker or separator in the email body option.

Now, that works BUT, if the first mail handler kicks in (Create a new issue from each email message) I get a brnad new Jira raised instead of the reply being added to the existing Jira.

Hope that makes sense. Any ideas how to get aorund this?

markstocker January 28, 2013

Hi

OK I've made a few steps forward now. and for reference I'm only trying to get this running for 3 projects,

I have 2 mailbox connections - 1 for Legal and 1 for Compliance. Each has their own mailbox and the Test works.

I have then setup a mail handler for each to - Create a new issue or add a comment to an existing issue. I test that and it works.

Under this config if someone replies to a Jira generated email that has the Jira reference in the subject box the whole of the reply gets added in as a comment (including all of the original email text). I want to change that so that it just adds in the new comment and excludes ll the original text.

I've played around with the other email handler to - Add a comment before a specified marker or separator in the email body, that works when it's running on it's own but seems to conflict with Create a new issue or add a comment to an existing issue when they are both running.

Any suggestions?

Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2013

Do you have stripquotes=true in your params?

William Rojas (Black Diamond) August 26, 2014

Hello:

Is the last scenario described by Mark supported?

Mainly, having two handlers against the same incoming email POP address?

For example a "Create New Issue or Add Comment to an Existing Issue" AND a 'Add a comment from a non-quoted email body" OR "Add a comment before a specified marker" reading from the same incoming mailbox?

Both of the add comment handlers do not allow to set stripquotes=true, that is only available in the "Crete New Issue handler".

Would like to use the "Create New Issue" for new emails, and one or both of the "Add Comment" handlers for followup emails on an existing issue or something to the equivalent. Is there a way to indicate a precedence on the handlers, if they can co-exist?

Thanks, William

Like Kevin McGuire likes this
0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 22, 2016
0 votes
Pierre-Olivier Vares January 31, 2016

Didn't read all the comments above, but did you ensure the "collecting address" field is filled in each handler ? So that each handler treat only relevant messages.

Suggest an answer

Log in or Sign up to answer