--- Mail-SpamAssassin-2.64/lib/Mail/SpamAssassin/NoMailAudit.pm Mon Dec 27 22:20:09 2004 +++ Mail/NoMailAudit.pm Mon Jan 3 15:58:51 2005 @@ -181,7 +181,20 @@ sub get_pristine_header { my ($self, $hdr) = @_; - my(@ret) = $self->{headers_pristine} =~ /^(?:$hdr:[ ]+(.*\n(?:\s+\S.*\n)*))/mig; + my @ret; + my @hdrs = split /$hdr:[ ]+/, $self->{headers_pristine}; + for (1 .. $#hdrs){ + my (@lines) = split /\n/, $hdrs[$_]; + my $line = ''; + foreach(@lines){ #line-by-line + if($_ =~ /^[^\s]/){ #end of hdr + last; + } + $line .= "$_\n"; + } + push(@ret, $line); + } + if (@ret) { return wantarray ? @ret : $ret[0]; }