On Wed, 6 Mar 2002, Matthew Cline wrote: > And here is the whole patch, all over again, with the anti-infinite-loop fix:
Slightly modified and applied, thanks! > Index: PerMsgStatus.pm > =================================================================== > RCS file: > /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm,v > retrieving revision 1.80 > diff -u -3 -p -r1.80 PerMsgStatus.pm > --- PerMsgStatus.pm 6 Mar 2002 11:23:35 -0000 1.80 > +++ PerMsgStatus.pm 7 Mar 2002 01:29:54 -0000 > @@ -403,8 +403,27 @@ sub rewrite_as_spam { > $rep =~ s/=/=3D/gs; # quote the = chars > } > > - unshift (@{$lines}, split (/$/, $rep)); > - $lines->[0] =~ s/\n//; > + if ($self->{msg}->get_header ('Content-Type') =~ /boundary="(.*)"/) { > + # Deal with MIME "null block". If this is a multipart MIME mail, > + # peel off the MIME header for the main part of the message, > + # stick in the report, then put the MIME header back in front, > + # so that the report is *after* the MIME header. > + my $boundary = "--" . quotemeta($1); > + my @main_part = (); > + > + push(@main_part, shift(@{$lines})) while ($lines->[0] !~ /^$boundary/); > + push(@main_part, shift(@{$lines})) while ($lines->[0] !~ /^$/); > + push(@main_part, shift(@{$lines})); > + > + unshift (@{$lines}, split (/$/, $rep)); > + $lines->[0] =~ s/\n//; > + unshift (@{$lines}, @main_part); > + } > + else { > + unshift (@{$lines}, split (/$/, $rep)); > + $lines->[0] =~ s/\n//; > + } > + > $self->{msg}->replace_body ($lines); > } > > -- Matt. <:->get a SMart net</:-> ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk