From f1da71c91c32f7efe375003e83347ebb1104c3eb Mon Sep 17 00:00:00 2001 From: Shawn Iverson Date: Sat, 13 Oct 2018 14:35:02 -0400 Subject: [PATCH] Fix Header Add (#249) --- common/usr/share/MailScanner/perl/MailScanner/MSMail.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/usr/share/MailScanner/perl/MailScanner/MSMail.pm b/common/usr/share/MailScanner/perl/MailScanner/MSMail.pm index 6f0520d..b6553e2 100644 --- a/common/usr/share/MailScanner/perl/MailScanner/MSMail.pm +++ b/common/usr/share/MailScanner/perl/MailScanner/MSMail.pm @@ -611,6 +611,7 @@ sub new { } } else { $pos = $#{$message->{metadata}}; + $pos++; } # Need to split the new header data into the 1st line and a list of @@ -721,6 +722,7 @@ sub new { $oldlocation++; } while($linenum<$totallines && $message->{metadata}[$oldlocation] =~ /^H\s/); + $oldlocation--; my(@lines, $line, $firstline); @lines = split(/\n/, $newvalue);