From c8e9db316a302946a20cdcb0c16679490c714e06 Mon Sep 17 00:00:00 2001 From: Blars Blarson Date: Sun, 9 Sep 2007 02:22:42 -0700 Subject: [PATCH] fix spamscan-sa --- scripts/spamscan-sa | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/spamscan-sa b/scripts/spamscan-sa index 3dd5f19..02d6ae5 100755 --- a/scripts/spamscan-sa +++ b/scripts/spamscan-sa @@ -101,13 +101,10 @@ while (my $id = ) { $out .= " spam $score\n"; $nseen = $score; } else { + my ($before, $received, $after) = $headers =~ + /(^.*?)(^Received\: \(at .*?\n)(.*$)/ms; open OUT, "> incoming/I$id" or die "open incoming/I$id: $!"; - my ($received, $from, $other_headers) = - split(/\n/, $headers, 3); - if ($recevied =~ /^From /) { - ($received, $from) = ($from, $received); - } - print OUT "$received\n$from\n$other_headers" + print OUT $received . $before . $after or die "print incoming/I$id: $!"; if ($ca_score > 1) { print OUT "X-CrossAssassin-Score: $ca_score\n" -- 2.39.2