Exchange 2007 POP3/IMAP integration issues with Jira

Greg Redl August 30, 2011

I have an open support ticket with Atlassian, and they suggested posting within this forum.

Background:

Jira 4.1.6 hosted on Windows Server 2008 R2

Microsoft Exchange 2007 Ent

I have followed the online instructions to allow Creating Issues and Comments from Email - http://confluence.atlassian.com/display/JIRA041/Creating+Issues+and+Comments+from+Email?from=sac_createissue. I am continuing to run into issues where authentication fails or it won't work at all:

JiraQuartzScheduler_Worker-1 ERROR ServiceRunner Create/Comment [service.services.mail.MailFetcherService] Create/Comment[10033]: Error connecting to host 'MAILSERVER' as user 'USER' via protocol 'pop3': javax.mail.AuthenticationFailedException: Command is not valid in this state.


Has anyone implemented this scenario? If so, how did you actually get it to work?

4 answers

1 accepted

1 vote
Answer accepted
Greg Redl September 21, 2011

Below was the response I sent back to Atlassian support. Hopefully it will prevent someone else from going through the same configuration pains I experienced.

I decided some additional research on the subject was in order. I find it strange that in the 3+ years Exchange 2007 has been out that no one else has raised this issue with Atlassian after what I found. That being said, I strongly recommend that you add this to Atlassian's knowledge-base and online documentation to include this information as a warning to other potential integrators of this feature.

Exchange 2003 was the last version to support native MIME storage for POP3/IMAP, and Exchange 2007/2010 only supports this feature using the MAPI protocol. There are documented cases indicating Microsoft has been working on a bug fix since 2008 for it, but there's no indication a fix is coming any time soon. This would be why JIRA and Thunderbird are unable to determine the actual SMTP address it was delivered to as a result. Instead, they can only return the primary SMTP assigned to the account.

3rd party plugins, like JEMH, will not magically fix the issue. They also rely on the POP/IMAP handlers within JIRA to provide additional features to enhance the built-in service(s).

I assume that Atlassian leverages Oracle's JavaMail API to provide its current POP/IMAP features. This same API also allows the use of the MAPI protocol, and I'm amazed that Atlassian hasn't considered using it - http://java.sun.com/products/javamail/Third_Party.html. I'm sure a few other customers, other than myself, would benefit from the inclusion of this as Exchange 2003's extended support expires in 2014.

However, as you stated, the only way I can get the Create Comments and Tickets from Email to work for all my JIRA projects is to create 20+ mailbox accounts, 20+ JIRA mail servers, and 20+ JIRA services.

Reference sites include:
http://social.technet.microsoft.com/forums/en-US/exchangesvrtransport/thread/e4fd7752-e009-4224-bfc8-e7e328ea9fcf/
http://forums.msexchange.org/m_1800529588/mpage_1/key_/tm.htm#1800529604
http://forums.msexchange.org/m_1800445998/mpage_1/key_/tm.htm#1800449573

As a result, I then had to determine what JIRA projects were absolutely necessary to have this feature included. In the end, 6 individual mailboxes, JIRA POP/IMAP mail servers, and POP/IMAP services were created - making an administration nightmare. Since opening my support ticket 1 month ago, I now have the Create Issues and Comments from Email feature working, and my ticket was closed as a "Feature Request".

0 votes
Greg Redl September 15, 2011

So I've installed JIRA 4.4.1 in a clean environment and reattempted. The new version allows me to test the mail server connection for the primary email account jira@company.com, so at least I know this part is working. However, the service does not pick up any emails and include them as either new tickets or comment updates.

I am using SMTP aliases for my JIRA projects, all within the primary account used to setup the working POP/IMAP mail server. Below is my handler parameter:

project=ITO, issuetype=1, catchemail=jira-ito@company.com, createusers=false, bulk=forward

My log files now indicate:

2011-09-16 08:35:20,264 QuartzWorker-1 DEBUG ServiceRunner    Create/Comment - ITO [service.services.mail.MailFetcherService] Create/Comment - ITO[10100]: There are 4 messages in the pop3 folder
2011-09-16 08:35:20,498 QuartzWorker-1 DEBUG ServiceRunner    Create/Comment - ITO [service.services.mail.MailFetcherService] Message Subject: New Jira Testing ticket creation
2011-09-16 08:35:20,498 QuartzWorker-1 DEBUG ServiceRunner    Create/Comment - ITO [service.services.mail.MailFetcherService] Message-ID: <F212EA479BB09045BAD1FA864E5906391B082B9D18@mailserver.company.local>
2011-09-16 08:35:20,498 QuartzWorker-1 DEBUG ServiceRunner    Create/Comment - ITO [service.util.handler.AbstractMessageHandler] Cannot handle message as the recipient(s) (jira@company.com) do not match the catch email jira-ito@company.com
2011-09-16 08:35:20,498 QuartzWorker-1 DEBUG ServiceRunner    Create/Comment - ITO [service.util.handler.CreateOrCommentHandler] Cannot handle message 'New Jira Testing ticket creation'.

So, it sees that there are 4 messages in the POP account. The catchemail alias does not appear to be associating with the POP/IMAP mail server account; wheres, the instructions online indicate this can be used.

Does anyone have any suggestions?

0 votes
Greg Redl September 15, 2011

So I've installed JIRA 4.4.1 in a clean environment and reattempted. The new version allows me to test the mail server connection for the primary email account jira@company.com, so at least I know this part is working. However, the service does not pick up any emails and include them as either new tickets or comment updates.

I am using SMTP aliases for my JIRA projects, all within the primary account used to setup the working POP/IMAP mail server. Below is my handler parameter:

project=ITO, issuetype=1, catchemail=jira-ito@company.com, createusers=false, bulk=forward

Does anyone have any suggestions?

0 votes
Tim Eddelbüttel
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.
August 30, 2011

Hello,
in one Jira project we use POP3 integration with Exchange 2007 as mail server.
It works fine for us.
In the username we don't need to specifiy the user1@domail.com. You only need user1.

Are you sure, that the POP3/IMAP Service is activated for this mailbox by your Exchange Administrator?
In our enviroment it's deactivated for all user and will be activated if there is a need for this.

Regards,
Tim

Greg Redl August 30, 2011

Tim,

I am also the Exchange admin and found that I needed to change the authentication method to PlainText. I did have it working for 2 days and then it stopped. I have not been able to get it back working since.

I originally had the username as user like you did, but could never get it to work. With Atlassian support assistance, I reconfigured the Jira mail server account using FQDN and username in the Pre-Windows 2000 format of user@domain.local, and that got it working in the first place. Not 2 days later did it stop working :(

I have blown away and readded my config a few dozen times, all with the same result - "Command is not valid in this state" messages in the logs. I am only starting out with one project, but would like to alias additional projects with the one Exchange account using the catchemail parameter.

I have also tried IMAP, using the additional startup parameters, but continue to have certificate issues.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events