Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
4.4.3
-
Windows 7
Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1
-
4.04
-
4
-
Severity 3 - Minor
-
-
Description
This is a problem that causes emails to get stuck in the pop server and arises when there is a splitregex setting in the handler params for mail services and the email has an empty body and attachemnt.
The error
2011-11-23 23:42:05,252 QuartzWorker-0 WARN ServiceRunner POP3 Service [com.atlassian.mail.MailUtils] Unable to extract text from MIME part with Content-Type 'application/msword; name="FINAL IDDI Manual September 2010 (2).doc" 2011-11-23 23:42:05,299 QuartzWorker-0 WARN ServiceRunner POP3 Service [service.util.handler.RegexCommentHandler] Failed to split email body. Appending raw content... java.lang.NullPointerException at org.apache.oro.text.regex.PatternMatcherInput.<init>(Unknown Source) at org.apache.oro.text.perl.Perl5Util.split(Unknown Source) at org.apache.oro.text.perl.Perl5Util.split(Unknown Source) at com.atlassian.jira.service.util.handler.RegexCommentHandler.splitMailBody(RegexCommentHandler.java:46) at com.atlassian.jira.service.util.handler.RegexCommentHandler.getEmailBody(RegexCommentHandler.java:35) at com.atlassian.jira.service.util.handler.AbstractCommentHandler.handleMessage(AbstractCommentHandler.java:78) at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:186) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:60) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 2011-11-23 23:42:05,314 QuartzWorker-0 WARN ServiceRunner POP3 Service [com.atlassian.mail.MailUtils] Unable to extract text from MIME part with Content-Type 'application/msword; name="FINAL IDDI Manual September 2010 (2).doc"
Need a windows client machine. (eg: Windows 7 in testing)
And possibly an Exchange server, I'm not sure if other mail servers will have the same fault. They may format the pop3 response differently...
Reproduction Method:
From Windows 7
- Create a dummy document (eg) test.docx
- Right-click test.docx, select Send to | Mail recipient. This should open an email window.
- Add the recipient (eg, in our case) Jira
- Add the issue tag to the subject line, eg, [JIR-484]
- Delete all message content
- Send
Note:
It's the absence of a main message body that causes the problem.
Using Outlook and deleting the message body did not produce a blocked email. Presumably, Outlook puts a bit of "empty" html in the message body. Unsure what other mail clients would be able to produce a "bad" message - would need to do plain text, with and empty message and an attachment.
The service is configured like this:
Our mail set up uses the POP3 service in a comment only mode with the regex comment splitter: usessl: No SSL popserver: DHHS-POP3-jira.issues handler.params: reporterusername=jiraadmin, createusers=false, splitregex="===|\s*_*\s*From: JIRA (by:", bulk=delete forwardEmail: youremailaddress@atlassian.com handler: Regex Comment Handler
This basically splits off:
- anything after a === character sequence (people put this in their signature at the chop point to remove history, etc) and
- the jira notification so people can reply to notifications with a quick comment.