rpms/spamassassin/FC-4 spamassassin-3.0.4-3712-memory-too-many-newlines.patch, NONE, 1.1 spamassassin-3.0.4-3949-ALL_TRUSTED-unparsable-misfire.patch, NONE, 1.1 spamassassin-3.0.4-4065-fix-FORGED_MUA_OUTLOOK.patch, NONE, 1.1 spamassassin-3.0.4-4190-race-condition-spamd-forking.patch, NONE, 1.1 spamassassin-3.0.4-4275-case-insensitive-uri.patch, NONE, 1.1 spamassassin-3.0.4-4346-sa-learn-skip-large-messages.patch, NONE, 1.1 spamassassin-3.0.4-4390-backslash-uri-hiding.patch, NONE, 1.1 spamassassin-3.0.4-4439-remove-markup-CRLF.patch, NONE, 1.1 spamassassin-3.0.4-4464-Net-DNS-0.51-broken.patch, NONE, 1.1 spamassassin-3.0.4-4522-URI-JIS-linkify.patch, NONE, 1.1 spamassassin-3.0.4-4535-tweak-mime-boundary.patch, NONE, 1.1 spamassassin-3.0.4-4565-fp-yahoo-forged-rcvd.patch, NONE, 1.1 spamassassin-3.0.4-4570-avoid-segfault-large-headers.patch, NONE, 1.1 spamassassin-3.0.4-4655-initrd-kill-ppid.patch, NONE, 1.1 spamassassin.spec, 1.48, 1.49

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Nov 9 03:50:12 UTC 2005


Author: wtogami

Update of /cvs/dist/rpms/spamassassin/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv10530/FC-4

Modified Files:
	spamassassin.spec 
Added Files:
	spamassassin-3.0.4-3712-memory-too-many-newlines.patch 
	spamassassin-3.0.4-3949-ALL_TRUSTED-unparsable-misfire.patch 
	spamassassin-3.0.4-4065-fix-FORGED_MUA_OUTLOOK.patch 
	spamassassin-3.0.4-4190-race-condition-spamd-forking.patch 
	spamassassin-3.0.4-4275-case-insensitive-uri.patch 
	spamassassin-3.0.4-4346-sa-learn-skip-large-messages.patch 
	spamassassin-3.0.4-4390-backslash-uri-hiding.patch 
	spamassassin-3.0.4-4439-remove-markup-CRLF.patch 
	spamassassin-3.0.4-4464-Net-DNS-0.51-broken.patch 
	spamassassin-3.0.4-4522-URI-JIS-linkify.patch 
	spamassassin-3.0.4-4535-tweak-mime-boundary.patch 
	spamassassin-3.0.4-4565-fp-yahoo-forged-rcvd.patch 
	spamassassin-3.0.4-4570-avoid-segfault-large-headers.patch 
	spamassassin-3.0.4-4655-initrd-kill-ppid.patch 
Log Message:
auto-import spamassassin-3.0.4-2.fc4 on branch FC-4 from spamassassin-3.0.4-2.fc4.src.rpm

spamassassin-3.0.4-3712-memory-too-many-newlines.patch:
 Message.pm |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

--- NEW FILE spamassassin-3.0.4-3712-memory-too-many-newlines.patch ---
bug 3712: avoid high memory usage when the message contains many newline characters

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm	2005-09-10 14:39:34.000000000 -1000
@@ -220,8 +220,30 @@
   $self->{'pristine_body'} = join('', @message);
 
   # CRLF -> LF
-  for ( @message ) {
-    s/\r\n/\n/;
+  # also merge multiple blank lines into a single one
+  my $start;
+  # iterate over lines in reverse order
+  for (my $cnt=$#message; $cnt>=0; $cnt--) {
+    $message[$cnt] =~ s/\r\n/\n/;
+
+    # line is blank
+    if ($message[$cnt] !~ /\S/) {
+      if (!defined $start) {
+        $start=$cnt;
+      }
+      next unless $cnt == 0;
+    }
+
+    # line is not blank, or we've reached the beginning
+
+    # if we've got a series of blank lines, get rid of them
+    if (defined $start) {
+      my $num = $start-$cnt;
+      if ($num > 10) {
+        splice @message, $cnt+2, $num-1;
+      }
+      undef $start;
+    }
   }
 
   # If the message does need to get parsed, save off a copy of the body

spamassassin-3.0.4-3949-ALL_TRUSTED-unparsable-misfire.patch:
 EvalTests.pm                 |    8 +---
 Message/Metadata/Received.pm |   73 ++++++++++++++++++++++++-------------------
 PerMsgStatus.pm              |    1 
 3 files changed, 45 insertions(+), 37 deletions(-)

--- NEW FILE spamassassin-3.0.4-3949-ALL_TRUSTED-unparsable-misfire.patch ---
ALL_TRUSTED FP on unparsable Received header
Tom Schulz's patch which is a combination of the two previous patches
(note does not add no_relays case handled by 3.1.x)

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/EvalTests.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/EvalTests.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/EvalTests.pm	2005-06-05 21:31:23.000000000 -0400
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/EvalTests.pm	2005-10-11 15:42:29.000000000 -0400
@@ -3017,11 +3017,9 @@
 
 sub check_all_trusted {
   my ($self) = @_;
-  if ($self->{num_relays_untrusted} > 0) {
-    return 0;
-  } else {
-    return 1;
-  }
+  return $self->{num_relays_trusted} 
+        && !$self->{num_relays_untrusted}
+        && !$self->{num_relays_unparseable};
 }
 
 ###########################################################################
diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message/Metadata/Received.pm	2005-06-05 21:31:22.000000000 -0400
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm	2005-10-11 15:42:29.000000000 -0400
@@ -83,6 +83,8 @@
   $self->{num_relays_untrusted} = 0;
   $self->{relays_untrusted_str} = '';
 
+  $self->{num_relays_unparseable} = 0;
+
   # now figure out what relays are trusted...
   my $trusted = $main->{conf}->{trusted_networks};
   my $internal = $main->{conf}->{internal_networks};
@@ -402,6 +404,7 @@
     $auth = $1;
   }
 
+
   if (/^from /) {
     # try to catch enveloper senders
     if (/(?:return-path:? |envelope-(?:sender|from)[ =])(\S+)\b/i) {
@@ -859,12 +862,10 @@
       goto enough;
     }
 
-    # Received: from raptor.research.att.com (bala at localhost) by
-    # raptor.research.att.com (SGI-8.9.3/8.8.7) with ESMTP id KAA14788 
-    # for <asrg at example.com>; Fri, 7 Mar 2003 10:37:56 -0500 (EST)
-    if (/^from (\S+) \((\S+\@\S+)\) by (\S+) \(/) { return; }
-
-    # Received: from mmail by argon.connect.org.uk with local (connectmail/exim) id 18tOsg-0008FX-00; Thu, 13 Mar 2003 09:20:06 +0000
+    # Received: from mmail by argon.connect.org.uk with local (connectmail/exim)
+    # id 18tOsg-0008FX-00; Thu, 13 Mar 2003 09:20:06 +0000
+    # Received: from andrew by trinity.supernews.net with local (Exim 4.12)
+    # id 18xeL6-000Dn1-00; Tue, 25 Mar 2003 02:39:00 +0000
     if (/^from (\S+) by (\S+) with local/) { return; }
 
     # Received: from [192.168.1.104] (account nazgul HELO [192.168.1.104])
@@ -969,66 +970,70 @@
   # ------------------------------------------------------------------------
   # IGNORED LINES: generally local-to-local or non-TCP/IP handovers
 
+  # Received: by faerber.muc.de (OpenXP/32 v3.9.4 (Win32) alpha @
+  # 2003-03-07-1751d); 07 Mar 2003 22:10:29 +0000
+  # Received: by x.x.org (bulk_mailer v1.13); Wed, 26 Mar 2003 20:44:41 -0600
+  # Received: by SPIDERMAN with Internet Mail Service (5.5.2653.19) id <19AF8VY2>; Tue, 25 Mar 2003 11:58:27 -0500
+  # Received: by oak.ein.cz (Postfix, from userid 1002) id DABBD1BED3;
+  # Thu, 13 Feb 2003 14:02:21 +0100 (CET)
+  # ignore any lines starting with "by", we want the "from"s!
+  if (/^by /) { return; }
+
+  # Received: from raptor.research.att.com (bala at localhost) by
+  # raptor.research.att.com (SGI-8.9.3/8.8.7) with ESMTP id KAA14788
+  # for <asrg at example.com>; Fri, 7 Mar 2003 10:37:56 -0500 (EST)
+  # make this localhost-specific, so we know it's safe to ignore
+  if (/^from \S+ \(\S+\@${LOCALHOST}\) by \S+ \(/) { return; }
+
   # from qmail-scanner-general-admin at lists.sourceforge.net by alpha by uid 7791 with qmail-scanner-1.14 (spamassassin: 2.41. Clear:SA:0(-4.1/5.0):. Processed in 0.209512 secs)
   if (/^from \S+\@\S+ by \S+ by uid \S+ /) { return; }
 
-  # Received: by x.x.org (bulk_mailer v1.13); Wed, 26 Mar 2003 20:44:41 -0600
-  if (/^by (\S+) \(bulk_mailer /) { return; }
-
   # Received: from DSmith1204 at aol.com by imo-m09.mx.aol.com (mail_out_v34.13.) id 7.53.208064a0 (4394); Sat, 11 Jan 2003 23:24:31 -0500 (EST)
   if (/^from \S+\@\S+ by \S+ /) { return; }
 
   # Received: from Unknown/Local ([?.?.?.?]) by mailcity.com; Fri, 17 Jan 2003 15:23:29 -0000
   if (/^from Unknown\/Local \(/) { return; }
 
-  # Received: by SPIDERMAN with Internet Mail Service (5.5.2653.19) id <19AF8VY2>; Tue, 25 Mar 2003 11:58:27 -0500
-  if (/^by \S+ with Internet Mail Service \(/) { return; }
-
-  # Received: by oak.ein.cz (Postfix, from userid 1002) id DABBD1BED3;
-  # Thu, 13 Feb 2003 14:02:21 +0100 (CET)
-  if (/^by (\S+) \(Postfix, from userid /) { return; }
-
   # Received: from localhost (mailnull at localhost) by x.org (8.12.6/8.9.3) 
   # with SMTP id h2R2iivG093740; Wed, 26 Mar 2003 20:44:44 -0600 
   # (CST) (envelope-from x at x.org)
   # Received: from localhost (localhost [127.0.0.1]) (uid 500) by mail with local; Tue, 07 Jan 2003 11:40:47 -0600
-  if (/^from ${LOCALHOST} \((?:\S+\@)?${LOCALHOST}[\) ]/) { return; }
+  if (/^from ${LOCALHOST} \((?:\S+\@)?${LOCALHOST}[\)\[]/) { return; }
 
   # Received: from olgisoft.com (127.0.0.1) by 127.0.0.1 (EzMTS MTSSmtp
   # 1.55d5) ; Thu, 20 Mar 03 10:06:43 +0100 for <asrg at ietf.org>
   if (/^from \S+ \((?:\S+\@)?${LOCALHOST}\) /) { return; }
 
   # Received: from casper.ghostscript.com (raph at casper [127.0.0.1]) h148aux8016336verify=FAIL); Tue, 4 Feb 2003 00:36:56 -0800
-  # TODO: could use IPv6 localhost
-  if (/^from (\S+) \(\S+\@\S+ \[127\.0\.0\.1\]\) /) { return; }
+  if (/^from (\S+) \(\S+\@\S+ \[${LOCALHOST}\]\) /) { return; }
 
   # Received: from (AUTH: e40a9cea) by vqx.net with esmtp (courier-0.40) for <asrg at ietf.org>; Mon, 03 Mar 2003 14:49:28 +0000
   if (/^from \(AUTH: (\S+)\) by (\S+) with /) { return; }
 
-  # Received: by faerber.muc.de (OpenXP/32 v3.9.4 (Win32) alpha @
-  # 2003-03-07-1751d); 07 Mar 2003 22:10:29 +0000
-  # ignore any lines starting with "by", we want the "from"s!
-  if (/^by \S+ /) { return; }
+  # Received: Message by Barricade wilhelm.eyp.ee with ESMTP id h1I7hGU06122 for <spamassassin-talk at lists.sourceforge.net>; Tue, 18 Feb 2003 09:43:16 +0200
+  if (/^Message by /) {
+    return;    # whatever
+  }
 
   # Received: FROM ca-ex-bridge1.nai.com BY scwsout1.nai.com ;
   # Fri Feb 07 10:18:12 2003 -0800
   if (/^FROM \S+ BY \S+ \; /) { return; }
 
-  # Received: from andrew by trinity.supernews.net with local (Exim 4.12)
-  # id 18xeL6-000Dn1-00; Tue, 25 Mar 2003 02:39:00 +0000
+  # ------------------------------------------------------------------------
+  # HANDOVERS WE KNOW WE CAN'T DEAL WITH: TCP transmission, but to MTAs that
+  # just don't log enough info for us to use (ie. no IP address present).
+  # Note: "goto unparseable" is strongly recommended here, unless you're sure
+  # the regexp won't match something in the field; otherwise ALL_TRUSTED may
+  # fire even in the presence of an unparseable Received header.
+
   # Received: from CATHY.IJS.SI by CATHY.IJS.SI (PMDF V4.3-10 #8779) id <01KTSSR50NSW001MXN at CATHY.IJS.SI>; Fri, 21 Mar 2003 20:50:56 +0100
   # Received: from MATT_LINUX by hippo.star.co.uk via smtpd (for mail.webnote.net [193.120.211.219]) with SMTP; 3 Jul 2002 15:43:50 UT
   # Received: from cp-its-ieg01.mail.saic.com by cpmx.mail.saic.com for me at jmason.org; Tue, 23 Jul 2002 14:09:10 -0700
-  if (/^from \S+ by \S+ (?:with|via|for|\()/) { return; }
+  if (/^from \S+ by \S+ (?:with|via|for|\()/) { goto unparseable; }
 
   # Received: from virtual-access.org by bolero.conactive.com ; Thu, 20 Feb 2003 23:32:58 +0100
   if (/^from (\S+) by (\S+) *\;/) {
-    return;	# can't trust this
-  }
-
-  # Received: Message by Barricade wilhelm.eyp.ee with ESMTP id h1I7hGU06122 for <spamassassin-talk at lists.sourceforge.net>; Tue, 18 Feb 2003 09:43:16 +0200
-  if (/^Message by /) {
-    return;	# whatever
+    goto unparseable;  # can't trust this
   }
 
   # ------------------------------------------------------------------------
@@ -1046,6 +1051,10 @@
 
   dbg ("received-header: unknown format: $_");
   # and skip the line entirely!  We can't parse it...
+
+unparseable:
+
+  $self->{num_relays_unparseable}++;
   return;
 
   # ------------------------------------------------------------------------
diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-06-05 21:31:23.000000000 -0400
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-10-11 15:42:29.000000000 -0400
@@ -1263,6 +1263,7 @@
   foreach my $item (qw(
 	relays_trusted relays_trusted_str num_relays_trusted
 	relays_untrusted relays_untrusted_str num_relays_untrusted
+	num_relays_unparseable
 	))
   {
     $self->{$item} = $self->{msg}->{metadata}->{$item};

spamassassin-3.0.4-4065-fix-FORGED_MUA_OUTLOOK.patch:
 20_ratware.cf |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4065-fix-FORGED_MUA_OUTLOOK.patch ---
diff -urN Mail-SpamAssassin-3.0.4.orig/rules/20_ratware.cf Mail-SpamAssassin-3.0.4/rules/20_ratware.cf
--- Mail-SpamAssassin-3.0.4.orig/rules/20_ratware.cf	2005-03-18 19:06:28.000000000 -0500
+++ Mail-SpamAssassin-3.0.4/rules/20_ratware.cf	2005-10-11 16:30:46.000000000 -0400
@@ -72,7 +72,8 @@
 header __OE_MUA			X-Mailer =~ /\bOutlook Express [456]\./
 header __OE_MSGID_1		MESSAGEID =~ /^<[A-Za-z0-9-]{7}[A-Za-z0-9]{20}\@hotmail\.com>$/m
 header __OE_MSGID_2		MESSAGEID =~ /^<(?:[0-9a-f]{8}|[0-9a-f]{12})\$[0-9a-f]{8}\$[0-9a-f]{8}\@\S+>$/m
-meta __FORGED_OE		(__OE_MUA && !__OE_MSGID_1 && !__OE_MSGID_2 && !__UNUSABLE_MSGID)
+header __OE_MSGID_3		MESSAGEID =~ /^<BAY\d+-DAV\d+[A-Z0-9]{25}\@phx\.gbl>$/m
+meta __FORGED_OE		(__OE_MUA && !__OE_MSGID_1 && !__OE_MSGID_2 && !__OE_MSGID_3 && !__UNUSABLE_MSGID)
 
 # Outlook versions that usually use "dollar signs"
 header __OUTLOOK_DOLLARS_MUA	X-Mailer =~ /^Microsoft Outlook(?: 8| CWS, Build 9|, Build 10)\./

spamassassin-3.0.4-4190-race-condition-spamd-forking.patch:
 spamd.raw |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

--- NEW FILE spamassassin-3.0.4-4190-race-condition-spamd-forking.patch ---
Index: spamd/spamd.raw
===================================================================
--- spamd/spamd.raw	(revision 331568)
+++ spamd/spamd.raw	(working copy)
@@ -804,7 +804,11 @@
 }
 
 while (1) {
-  sleep;    # wait for a signal (ie: child's death)
+   # wait for a signal (ie: child's death)
+   # bug 4190: use a time-limited sleep, and call child_handler() even
+   # if haven't received a SIGCHLD, due to inherent race condition
+   sleep 10;
+   child_handler();
 
   if ( defined $got_sighup ) {
     if (defined($opt{'pidfile'})) {
@@ -1766,17 +1770,22 @@
 sub child_handler {
   my ($sig) = @_;
 
-  unless ($main::INHIBIT_LOGGING_IN_SIGCHLD_HANDLER) {
-    logmsg("server hit by SIG$sig");
-  }
+  # do NOT call syslog here unless the child's pid is in our list of known
+  # children.  This is due to syslog-ng brokenness -- bugs 3625, 4237.
 
   # clean up any children which have exited
   while((my $pid = waitpid(-1, WNOHANG)) > 0) {
+    if (!defined $children{$pid}) {
+      # ignore this child; we didn't realise we'd forked it. bug 4237
+      next;
+    }
+
     # remove them from our child listing
     delete $children{$pid};
 
     unless ($main::INHIBIT_LOGGING_IN_SIGCHLD_HANDLER) {
-      logmsg("handled cleanup of child pid $pid");
+      logmsg("handled cleanup of child pid $pid".
+                 ((defined $sig) ? "due to SIG$sig" : ""));
     }
   }
 

spamassassin-3.0.4-4275-case-insensitive-uri.patch:
 PerMsgStatus.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4275-case-insensitive-uri.patch ---
Add "i" to make regex case insensitive
The latter part of the above patch that went into 3.1 seems unnecessary in 3.0.
Needs verification.

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-09-10 13:48:13.000000000 -1000
@@ -1735,7 +1735,7 @@
 my $unreserved = "A-Za-z0-9\Q$mark\E\x00-\x08\x0b\x0c\x0e-\x1f";
 my $uricSet = quotemeta($reserved) . $unreserved . "%";
 
-my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/;
+my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/i;
 
 my $uricCheat = $uricSet;
 $uricCheat =~ tr/://d;

spamassassin-3.0.4-4346-sa-learn-skip-large-messages.patch:
 sa-learn.raw |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4346-sa-learn-skip-large-messages.patch ---
Avoid massive memory usage during sa-learn on large messages

--- Mail-SpamAssassin-3.0.4/sa-learn.raw.orig	2005-09-10 00:44:34.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/sa-learn.raw	2005-09-10 00:44:46.000000000 -1000
@@ -374,7 +374,7 @@
     {
       'opt_j'   => 0,
       'opt_n'   => 1,
-      'opt_all' => 1,
+      'opt_all' => 0,
     }
   );
 

spamassassin-3.0.4-4390-backslash-uri-hiding.patch:
 Util.pm |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE spamassassin-3.0.4-4390-backslash-uri-hiding.patch ---
bug 4390: some MUAs autoconvert non-escaped back slashes into front slashes, so deal with them as appropriate.

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Util.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Util.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Util.pm	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Util.pm	2005-09-10 13:34:10.000000000 -1000
@@ -843,6 +843,11 @@
     # Make a copy so we don't trash the original in the array
     my $nuri = $uri;
 
+    # bug 4390: certain MUAs treat back slashes as front slashes.
+    # since backslashes are supposed to be encoded in a URI, swap non-encoded
+    # ones with front slashes.
+    $nuri =~ tr@\\@/@;
+
     # http:www.foo.biz -> http://www.foo.biz
     $nuri =~ s#^(https?:)/{0,2}#$1//#i;
 

spamassassin-3.0.4-4439-remove-markup-CRLF.patch:
 SpamAssassin.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4439-remove-markup-CRLF.patch ---
fix issue where DOS line endings (CRLF) breaks report_safe 1 markup removal ability

--- Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin.pm.orig	2005-09-10 13:08:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin.pm	2005-09-10 13:20:58.000000000 -1000
@@ -862,7 +862,7 @@
     my $cd = '';
     for ( my $i = 0 ; $i <= $#msg ; $i++ ) {
       # only look at mime part headers
-      next unless ( $msg[$i] =~ /^--$boundary$/ || $flag );
+      next unless ( $msg[$i] =~ /^--$boundary\r?$/ || $flag );
 
       if ( $msg[$i] =~ /^\s*$/ ) {    # end of mime header
 

spamassassin-3.0.4-4464-Net-DNS-0.51-broken.patch:
 INSTALL |    2 ++
 1 files changed, 2 insertions(+)

--- NEW FILE spamassassin-3.0.4-4464-Net-DNS-0.51-broken.patch ---
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4464
Net::DNS 0.51 is nonfunctional with SA
Note in documentation

diff -urN Mail-SpamAssassin-3.0.4.orig/INSTALL Mail-SpamAssassin-3.0.4/INSTALL
--- Mail-SpamAssassin-3.0.4.orig/INSTALL	2005-03-18 19:06:29.000000000 -0500
+++ Mail-SpamAssassin-3.0.4/INSTALL	2005-10-30 21:04:49.000000000 -0500
@@ -249,6 +249,8 @@
       - version 0.34 or higher on Unix systems
       - version 0.46 or higher on Windows systems
 
+    Be warned that Net::DNS 0.51 is non-functional with SpamAssassin.
+    http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4464
 
   - Net::SMTP (from CPAN)
 

spamassassin-3.0.4-4522-URI-JIS-linkify.patch:
 PerMsgStatus.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4522-URI-JIS-linkify.patch ---
http://svn.apache.org/viewcvs?rev=280738&view=rev
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4522
URIs not detected if JIS encoding follows the URI

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-06-05 21:31:23.000000000 -0400
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/PerMsgStatus.pm	2005-10-30 20:59:03.000000000 -0500
@@ -1732,7 +1732,7 @@
 # Taken from URI and URI::Find
 my $reserved   = q(;/?:@&=+$,[]\#|);
 my $mark       = q(-_.!~*'());                                    #'; emacs
-my $unreserved = "A-Za-z0-9\Q$mark\E\x00-\x08\x0b\x0c\x0e-\x1f";
+my $unreserved = "A-Za-z0-9\Q$mark\E\x00-\x08\x0b\x0c\x0e-\x1a\x1c-\x1f";
 my $uricSet = quotemeta($reserved) . $unreserved . "%";
 
 my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/;

spamassassin-3.0.4-4535-tweak-mime-boundary.patch:
 Message.pm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

--- NEW FILE spamassassin-3.0.4-4535-tweak-mime-boundary.patch ---
Bug 4535: Tweak MIME boundary regexp

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm	2005-09-10 14:16:15.000000000 -1000
@@ -483,7 +483,7 @@
   foreach ( @{$body} ) {
     # if we're on the last body line, or we find any boundary marker,
     # deal with the mime part
-    if ( --$line_count == 0 || (defined $boundary && /^--\Q$boundary\E(?:--|\s*$)/) ) {
+    if ( --$line_count == 0 || (defined $boundary && /^--\Q$boundary\E(?:--)?\s*$/) ) {
       my $line = $_; # remember the last line
 
       # per rfc 1521, the CRLF before the boundary is part of the boundary:
@@ -510,10 +510,10 @@
       dbg("found part of type ".$part_msg->{'type'}.", boundary: ".(defined $p_boundary ? $p_boundary : ''));
       $self->parse_body( $msg, $part_msg, $p_boundary, $part_array, 0 );
 
-      # rfc 1521 says /^--boundary--$/ but MUAs have a tendancy to just
-      # require /^--boundary--/ due to malformed messages, so that'll work for
-      # us as well.
-      if (defined $boundary && $line =~ /^--\Q${boundary}\E--/) {
+      # rfc 1521 says /^--boundary--$/, some MUAs may just require /^--boundary--/
+      # but this causes problems with horizontal lines when the boundary is
+      # made up of dashes as well, etc.
+      if (defined $boundary && $line =~ /^--\Q${boundary}\E--\s*$/) {
 	# Make a note that we've seen the end boundary
 	$self->{mime_boundary_state}->{$boundary}--;
         last;

spamassassin-3.0.4-4565-fp-yahoo-forged-rcvd.patch:
 EvalTests.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4565-fp-yahoo-forged-rcvd.patch ---
Avoid false positives with a certain type of Yahoo Groups mail

--- Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/EvalTests.pm.orig	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/EvalTests.pm	2005-09-10 00:55:10.000000000 -1000
@@ -502,7 +502,7 @@
   if ($rcvd =~ /by smtp\S+\.yahoo\.com with SMTP/) { return 0; }
   my $IP_ADDRESS = IP_ADDRESS;
   if ($rcvd =~
-      /from \[$IP_ADDRESS\] by \S+\.(?:groups|scd)\.yahoo\.com with NNFMP/) {
+      /from \[$IP_ADDRESS\] by \S+\.(?:groups|scd|dcn)\.yahoo\.com with NNFMP/) {
     return 0;
   }
 

spamassassin-3.0.4-4570-avoid-segfault-large-headers.patch:
 Message.pm |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE spamassassin-3.0.4-4570-avoid-segfault-large-headers.patch ---
Bug 4570 fix regexp to not segfault given large headers

diff -urN Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm
--- Mail-SpamAssassin-3.0.4.orig/lib/Mail/SpamAssassin/Message.pm	2005-06-05 15:31:23.000000000 -1000
+++ Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin/Message.pm	2005-09-11 13:14:34.000000000 -1000
@@ -324,7 +324,7 @@
   my ($self, $hdr) = @_;
   
   return $self->{pristine_headers} unless $hdr;
-  my(@ret) = $self->{pristine_headers} =~ /^(?:$hdr:[ \t]+(.*\n(?:\s+\S.*\n)*))/mig;
+  my(@ret) = $self->{pristine_headers} =~ /^\Q$hdr\E:[ \t]+(.*?\n(?![ \t]))/smgi;
   if (@ret) {
     return wantarray ? @ret : $ret[-1];
   }

spamassassin-3.0.4-4655-initrd-kill-ppid.patch:
 redhat-rc-script.sh |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

--- NEW FILE spamassassin-3.0.4-4655-initrd-kill-ppid.patch ---
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4655
init.d spamassassin restart kills wrong process and fails

diff -urN Mail-SpamAssassin-3.0.4.orig/spamd/redhat-rc-script.sh Mail-SpamAssassin-3.0.4/spamd/redhat-rc-script.sh
--- Mail-SpamAssassin-3.0.4.orig/spamd/redhat-rc-script.sh	2005-06-05 21:31:24.000000000 -0400
+++ Mail-SpamAssassin-3.0.4/spamd/redhat-rc-script.sh	2005-10-30 22:18:14.000000000 -0500
@@ -19,6 +19,7 @@
 
 # Set default spamd configuration.
 SPAMDOPTIONS="-d -c -m5 -H"
+SPAMD_PID=/var/run/spamassassin/spamd.pid
 
 # Source spamd configuration.
 if [ -f /etc/sysconfig/spamassassin ] ; then
@@ -36,10 +37,13 @@
   start)
 	# Start daemon.
 	echo -n "Starting spamd: "
-	daemon $NICELEVEL spamd $SPAMDOPTIONS
+	daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID
 	RETVAL=$?
         echo
-        [ $RETVAL = 0 ] && touch /var/lock/subsys/spamassassin
+	if [ $RETVAL = 0 ]; then
+		[ -n "$SPAMD_PID" ] && ln -s $SPAMD_PID /var/run/spamd.pid
+		touch /var/lock/subsys/spamassassin
+	fi
         ;;
   stop)
         # Stop daemons.
@@ -47,7 +51,10 @@
         killproc spamd
         RETVAL=$?
         echo
-        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
+	if [ $RETVAL = 0 ]; then
+		rm -f /var/lock/subsys/spamassassin
+		rm -f /var/run/spamd.pid
+	fi
         ;;
   restart)
         $0 stop


Index: spamassassin.spec
===================================================================
RCS file: /cvs/dist/rpms/spamassassin/FC-4/spamassassin.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- spamassassin.spec	16 Jun 2005 20:14:50 -0000	1.48
+++ spamassassin.spec	9 Nov 2005 03:49:50 -0000	1.49
@@ -6,7 +6,7 @@
 Summary: Spam filter for email which can be invoked from mail delivery agents.
 Name: spamassassin
 Version: 3.0.4
-Release: 1.fc4
+Release: 2.fc4
 License: Apache License
 Group: Applications/Internet
 URL: http://spamassassin.apache.org/
@@ -19,7 +19,21 @@
 # Patches 0-99 are RH specific
 # none yet
 # Patches 100+ are SVN backports (DO NOT REUSE!)
-#Patch107: spamassassin-3.0.3-allow-disabling-subject-rewriting.patch
+Patch108: spamassassin-3.0.4-3712-memory-too-many-newlines.patch
+Patch109: spamassassin-3.0.4-3949-ALL_TRUSTED-unparsable-misfire.patch
+Patch110: spamassassin-3.0.4-4065-fix-FORGED_MUA_OUTLOOK.patch
+Patch111: spamassassin-3.0.4-4190-race-condition-spamd-forking.patch
+Patch112: spamassassin-3.0.4-4275-case-insensitive-uri.patch
+Patch113: spamassassin-3.0.4-4346-sa-learn-skip-large-messages.patch
+Patch114: spamassassin-3.0.4-4390-backslash-uri-hiding.patch
+Patch115: spamassassin-3.0.4-4439-remove-markup-CRLF.patch
+Patch116: spamassassin-3.0.4-4464-Net-DNS-0.51-broken.patch
+Patch117: spamassassin-3.0.4-4522-URI-JIS-linkify.patch
+Patch118: spamassassin-3.0.4-4535-tweak-mime-boundary.patch
+Patch119: spamassassin-3.0.4-4565-fp-yahoo-forged-rcvd.patch
+Patch120: spamassassin-3.0.4-4570-avoid-segfault-large-headers.patch
+Patch121: spamassassin-3.0.4-4655-initrd-kill-ppid.patch
+
 # end of patches
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Buildroot: %{_tmppath}/%{name}-root
@@ -60,7 +74,20 @@
 # Patches 0-99 are RH specific
 # none yet
 # Patches 100+ are SVN backports (DO NOT REUSE!)
-#%patch107 -p1
+%patch108 -p1
+%patch109 -p1
+%patch110 -p1
+%patch111 -p0
+%patch112 -p1
+%patch113 -p1
+%patch114 -p1
+%patch115 -p1
+%patch116 -p1
+%patch117 -p1
+%patch118 -p1
+%patch119 -p1
+%patch120 -p1
+%patch121 -p1
 # end of patches
 
 %build
@@ -106,6 +133,8 @@
 find $RPM_BUILD_ROOT%{perl_vendorlib}/* -type d -print |
         sed "s@^$RPM_BUILD_ROOT@%dir @g" >> %{name}-%{version}-filelist
 
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/spamassassin
+
 %files -f %{name}-%{version}-filelist
 %defattr(-,root,root)
 %doc BUGS LICENSE NOTICE CREDITS Changes README STATUS TRADEMARK UPGRADE
@@ -114,6 +143,7 @@
 %config(noreplace) %{_sysconfdir}/mail/spamassassin
 %config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
 %dir %{_datadir}/spamassassin
+%dir %{_localstatedir}/run/spamassassin
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -147,6 +177,9 @@
 exit 0
 
 %changelog
+* Tue Nov 08 2005 Warren Togami <wtogami at redhat.com> - 3.0.4-2
+- 3.0.5 release candidate
+
 * Sun Jun 05 2005 Warren Togami <wtogami at redhat.com> - 3.0.4-1
 - 3.0.4 with more bug fixes and CAN-2005-1266
 




More information about the fedora-cvs-commits mailing list