Jira mail handler for multiple projects

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!



3 answers

1 vote

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)

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...

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?


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?

Do you have stripquotes=true in your params?


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

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,513 views 15 20
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you