<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hello,</p>
<p>I have been trying to track down a problem with multiple line breaks showing up in emails sent to RT from Outlook 2010 for Windows.  <br />I am using the RT 4.0.12-2 Debian package (which has the 4.0.13 CVE patches applied).<br />The problem only seems to occur on the Windows boxes, as Outlook 2010 for Mac does not exhibit the behavior.  Here is a mailbox file that contains<br />a simple message which reproduces the problem for me:</p>
<p>http://thunderkeys.net/temp/rt-multiline-outlook.mbox</p>
<p>I am happy to provide more details/try debugging code/etc.  It looks like the message makes it down to RescueOutlook but then does not match the \n\n pattern,<br />so nothing is replaced.  Looking at the raw decoded mail, it has ^Ms in it, so I tried the following patch, which fixes the duplicate line issue, but I am not sure if it will break anything else.</p>
<p> </p>
<p>--- EmailParser.pm 2013-05-30 13:10:09.239741620 -0400<br />+++ EmailParser.pm.new 2013-05-30 13:11:46.667736182 -0400</p>
<p>@@ -599,7 +599,7 @@<br /> <br /> # use the unencoded string<br /> my $content = $text_part->bodyhandle->as_string;<br />- if ( $content =~ s/\n\n/\n/g ) {<br />+ if ( $content =~ s/\n\n/\n/g || $content =~ s/\r\n/\n/g) {<br /> <br /> # Outlook puts a space on extra newlines, remove it<br /> $content =~ s/\ +$//mg;</p>
<div> </div>
</body></html>