You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/07/10 00:31:21 UTC
svn commit: rev 22766 - spamassassin/trunk/lib/Mail/SpamAssassin
Author: felicity
Date: Fri Jul 9 15:31:20 2004
New Revision: 22766
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Log:
bug 3553: if in report_safe mode, and rewrite_header was set, and the message didn't have that header to rewrite, report_safe would add it without a newline at the end, so we'd have multiple headers in one line. Now, if the header doesn't exist in the original, assume it was blank (just a newline) so the output ends up correct.
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Fri Jul 9 15:31:20 2004
@@ -667,21 +667,21 @@
# possibilities right now, it's easier not to...
if ($self->{conf}->{rewrite_header}->{Subject}) {
- $subject ||= '';
+ $subject ||= "\n";
my $tag = $self->_replace_tags($self->{conf}->{rewrite_header}->{Subject});
$tag =~ s/\n/ /gs; # strip tag's newlines
$subject =~ s/^(?:\Q${tag}\E )?/${tag} /g; # For some reason the tag may already be there!?
}
if ($self->{conf}->{rewrite_header}->{To}) {
- $to ||= '';
+ $to ||= "\n";
my $tag = $self->_replace_tags($self->{conf}->{rewrite_header}->{To});
$tag =~ s/\n/ /gs; # strip tag's newlines
$to =~ s/(?:\t\Q(${tag})\E)?$/\t(${tag})/
}
if ($self->{conf}->{rewrite_header}->{From}) {
- $from ||= '';
+ $from ||= "\n";
my $tag = $self->_replace_tags($self->{conf}->{rewrite_header}->{From});
$tag =~ s/\n+//gs; # strip tag's newlines
$from =~ s/(?:\t\Q(${tag})\E)?$/\t(${tag})/