Multiple line breaks on Outlook 2010 for Windows

Hello,

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.
I am using the RT 4.0.12-2 Debian package (which has the 4.0.13 CVE
patches applied).
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
a simple message which reproduces the problem for me:

http://thunderkeys.net/temp/rt-multiline-outlook.mbox

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
nn pattern,
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.

EmailParser.pm 2013-05-30 13:10:09.239741620 -0400
+++ EmailParser.pm.new 2013-05-30 13:11:46.667736182 -0400

@@ -599,7 +599,7 @@

use the unencoded string

my $content = $text_part->bodyhandle->as_string;

  • if ( $content =~ s/nn/n/g ) {
  • if ( $content =~ s/nn/n/g || $content =~ s/rn/n/g) {

Outlook puts a space on extra newlines, remove it

$content =~ s/ +$//mg;