You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2020/01/27 12:48:06 UTC

svn commit: r1873207 - in /spamassassin/trunk: ./ lib/Mail/ lib/Mail/SpamAssassin/ lib/Mail/SpamAssassin/Plugin/ t/ t/data/dkim/ t/data/nice/ t/data/spam/

Author: hege
Date: Mon Jan 27 12:48:06 2020
New Revision: 1873207

URL: http://svn.apache.org/viewvc?rev=1873207&view=rev
Log:
CRLF handling fixes and additional tests (Bug 7785)

Added:
    spamassassin/trunk/t/data/dkim/test-pass-20.msg
    spamassassin/trunk/t/data/dkim/test-pass-21.msg
    spamassassin/trunk/t/data/dkim/test-pass-22.msg
    spamassassin/trunk/t/data/dkim/test-pass-23.msg
    spamassassin/trunk/t/data/nice/spf5-received-spf-crlf
    spamassassin/trunk/t/data/nice/spf6-received-spf-crlf2
    spamassassin/trunk/t/data/spam/gtubedcc_crlf.eml
Modified:
    spamassassin/trunk/MANIFEST
    spamassassin/trunk/lib/Mail/SpamAssassin.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm
    spamassassin/trunk/t/dcc.t
    spamassassin/trunk/t/dkim.t
    spamassassin/trunk/t/spf.t

Modified: spamassassin/trunk/MANIFEST
URL: http://svn.apache.org/viewvc/spamassassin/trunk/MANIFEST?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/MANIFEST (original)
+++ spamassassin/trunk/MANIFEST Mon Jan 27 12:48:06 2020
@@ -303,6 +303,10 @@ t/data/dkim/test-pass-16.msg
 t/data/dkim/test-pass-17.msg
 t/data/dkim/test-pass-18.msg
 t/data/dkim/test-pass-19.msg
+t/data/dkim/test-pass-20.msg
+t/data/dkim/test-pass-21.msg
+t/data/dkim/test-pass-22.msg
+t/data/dkim/test-pass-23.msg
 t/data/etc/hello.txt
 t/data/etc/testhost.cert
 t/data/etc/testhost.key
@@ -363,6 +367,8 @@ t/data/nice/spf2
 t/data/nice/spf3
 t/data/nice/spf3-received-spf
 t/data/nice/spf4-received-spf-nofold
+t/data/nice/spf5-received-spf-crlf
+t/data/nice/spf6-received-spf-crlf2
 t/data/nice/unicode1
 t/data/nice/unicode2
 t/data/reporterplugin.pm
@@ -395,6 +401,7 @@ t/data/spam/bsmtpnull
 t/data/spam/dnsbl.eml
 t/data/spam/gtube.eml
 t/data/spam/gtubedcc.eml
+t/data/spam/gtubedcc_crlf.eml
 t/data/spam/olevbmacro/encrypted.eml
 t/data/spam/olevbmacro/goodcsv.eml
 t/data/spam/olevbmacro/macro.eml

Modified: spamassassin/trunk/lib/Mail/SpamAssassin.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin.pm?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin.pm Mon Jan 27 12:48:06 2020
@@ -1157,13 +1157,12 @@ sub remove_spamassassin_markup {
   my $hdrs = $mail_obj->get_pristine_header();
   my $body = $mail_obj->get_pristine_body();
 
-  # remove DOS line endings
-  $hdrs =~ s/\r//gs;
+  # force \n for line-ending processing temporarily
+  $hdrs =~ s/\015?\012/\n/gs;
+  $body =~ s/\015?\012/\n/gs;
 
   # unfold SA added headers, but not X-Spam-Prev headers ...
-  $hdrs = "\n".$hdrs;   # simplifies regexp below
-  1 while $hdrs =~ s/(\nX-Spam-(?!Prev).+?)\n[ \t]+(\S.*\n)/$1 $2/g;
-  $hdrs =~ s/^\n//;
+  1 while $hdrs =~ s/((?:^|\n)X-Spam-(?!Prev).+?)\n[ \t]+(\S.*\n)/$1 $2/g;
 
 ###########################################################################
   # Backward Compatibility, pre 3.0.x.
@@ -1214,14 +1213,11 @@ sub remove_spamassassin_markup {
   }
 
   # remove any other X-Spam headers we added, will be unfolded
-  $hdrs = "\n".$hdrs;   # simplifies regexp below
-  1 while $hdrs =~ s/\nX-Spam-.*\n/\n/g;
-  $hdrs =~ s/^\n//;
-
-  # re-add DOS line endings
-  if ($mail_obj->{line_ending} ne "\n") {
-    $hdrs =~ s/\r?\n/$mail_obj->{line_ending}/gs;
-  }
+  1 while $hdrs =~ s/(^|\n)X-Spam-.*\n/$1/g;
+
+  # force original message line endings
+  $hdrs =~ s/\n/$mail_obj->{line_ending}/gs;
+  $body =~ s/\n/$mail_obj->{line_ending}/gs;
 
   # Put the whole thing back together ...
   return join ('', $mbox, $hdrs, $body);

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm Mon Jan 27 12:48:06 2020
@@ -3280,6 +3280,10 @@ The full message is the pristine message
 body, including all MIME data such as images, other attachments, MIME
 boundaries, etc.
 
+Note that CRLF/LF line endings are matched as the original message has them.
+For any full rules that match newlines, it's recommended to use \r?$ instead
+of plain $, so it works on all systems.
+
 =item full SYMBOLIC_TEST_NAME eval:name_of_eval_method([args])
 
 Define a full message eval test.  See above.

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Mon Jan 27 12:48:06 2020
@@ -251,7 +251,7 @@ sub new {
   # bug 4363
   # Check to see if we should do CRLF instead of just LF
   # For now, just check the first and last line and do whatever it does
-  if (@message && (index($message[0], "\015\012") != -1 || index($message[-1], "\015\012") != -1)) {
+  if (index($message[0], "\015\012") != -1 || index($message[-1], "\015\012") != -1) {
     $self->{line_ending} = "\015\012";
     dbg("message: line ending changed to CRLF");
   }
@@ -265,7 +265,12 @@ sub new {
   for (;;) {
     # make sure not to lose the last header field when there is no body
     my $eof = !@message;
-    my $current = $eof ? "\n" : shift @message;
+    my $current = $eof ? $self->{line_ending} : shift @message;
+
+    # Bug 7785: spamass-milter breaks wrapped headers, add any missing \r
+    if ($squash_crlf) {
+      $current =~ s/(?<!\015)\012/\015\012/gs;
+    }
 
     if ( $current =~ /^[ \t]/ ) {
       # This wasn't useful in terms of a rule, but we may want to treat it
@@ -301,7 +306,7 @@ sub new {
         }
       }
 
-      if ($current eq "\012" || $current eq "\015\012") {  # a regular end of a header section
+      if ($current eq $self->{line_ending}) {  # a regular end of a header section
 	if ($eof) {
 	  $self->{'missing_head_body_separator'} = 1;
 	} else {

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm Mon Jan 27 12:48:06 2020
@@ -835,10 +835,9 @@ sub _check_dkim_signature {
         $verifier->PRINT($str);
       } else {
         # feeding large chunk to Mail::DKIM is _much_ faster than line-by-line
-        my $str2 = $str; # make a copy, sigh
-        $str2 =~ s/\012/\015\012/gs; # LF -> CRLF
-        $verifier->PRINT($str2);
-        undef $str2;
+        $str =~ s/\012/\015\012/gs; # LF -> CRLF
+        $verifier->PRINT($str);
+        undef $str;
       }
       1;
     } or do {  # intercept die() exceptions and render safe

Added: spamassassin/trunk/t/data/dkim/test-pass-20.msg
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/dkim/test-pass-20.msg?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/dkim/test-pass-20.msg (added)
+++ spamassassin/trunk/t/data/dkim/test-pass-20.msg Mon Jan 27 12:48:06 2020
@@ -0,0 +1,15 @@
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=
+	sa-test.spamassassin.org; h=from:to:subject:message-id:date
+	:mime-version:content-type; s=t0512; bh=15pFrAvOGi+eHKJgB6psh6iI
+	BCbvYSuhPj+wQn6C7Ss=; b=XaUxvujH+n+i0ABzd5x1ItymfUliXUaW3CuyMCIG
+	aMalpjxOZsu95GzcVpGsIE5qX5RY4ENP3cn6hfs634FDHw==
+From: SpamAssassin Test <te...@sa-test.spamassassin.org>
+To: undisclosed-recipients:;
+Subject: test message 19
+X-Foobar: it's really test 20 but with crlf added
+Message-ID: <4A...@spamassassin.org>
+Date: Mon, 08 Jun 2009 12:00:00 +0000
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+testing

Added: spamassassin/trunk/t/data/dkim/test-pass-21.msg
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/dkim/test-pass-21.msg?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/dkim/test-pass-21.msg (added)
+++ spamassassin/trunk/t/data/dkim/test-pass-21.msg Mon Jan 27 12:48:06 2020
@@ -0,0 +1,15 @@
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=
+	sa-test.spamassassin.org; h=from:to:subject:message-id:date
+	:mime-version:content-type; s=t0512; bh=15pFrAvOGi+eHKJgB6psh6iI
+	BCbvYSuhPj+wQn6C7Ss=; b=XaUxvujH+n+i0ABzd5x1ItymfUliXUaW3CuyMCIG
+	aMalpjxOZsu95GzcVpGsIE5qX5RY4ENP3cn6hfs634FDHw==
+From: SpamAssassin Test <te...@sa-test.spamassassin.org>
+To: undisclosed-recipients:;
+Subject: test message 19
+X-Foobar: it's really test 21 but with crlf added and bug 7785
+Message-ID: <4A...@spamassassin.org>
+Date: Mon, 08 Jun 2009 12:00:00 +0000
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+testing

Added: spamassassin/trunk/t/data/dkim/test-pass-22.msg
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/dkim/test-pass-22.msg?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/dkim/test-pass-22.msg (added)
+++ spamassassin/trunk/t/data/dkim/test-pass-22.msg Mon Jan 27 12:48:06 2020
@@ -0,0 +1,16 @@
+X-Foobar: first line, verify crlf detection works vs test 21
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=
+	sa-test.spamassassin.org; h=from:to:subject:message-id:date
+	:mime-version:content-type; s=t0512; bh=15pFrAvOGi+eHKJgB6psh6iI
+	BCbvYSuhPj+wQn6C7Ss=; b=XaUxvujH+n+i0ABzd5x1ItymfUliXUaW3CuyMCIG
+	aMalpjxOZsu95GzcVpGsIE5qX5RY4ENP3cn6hfs634FDHw==
+From: SpamAssassin Test <te...@sa-test.spamassassin.org>
+To: undisclosed-recipients:;
+Subject: test message 19
+X-Foobar: it's really test 22 but with crlf added and bug 7785
+Message-ID: <4A...@spamassassin.org>
+Date: Mon, 08 Jun 2009 12:00:00 +0000
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+testing

Added: spamassassin/trunk/t/data/dkim/test-pass-23.msg
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/dkim/test-pass-23.msg?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/dkim/test-pass-23.msg (added)
+++ spamassassin/trunk/t/data/dkim/test-pass-23.msg Mon Jan 27 12:48:06 2020
@@ -0,0 +1,15 @@
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=
+	sa-test.spamassassin.org; h=from:to:subject:message-id:date
+	:mime-version:content-type; s=t0512; bh=15pFrAvOGi+eHKJgB6psh6iI
+	BCbvYSuhPj+wQn6C7Ss=; b=XaUxvujH+n+i0ABzd5x1ItymfUliXUaW3CuyMCIG
+	aMalpjxOZsu95GzcVpGsIE5qX5RY4ENP3cn6hfs634FDHw==
+From: SpamAssassin Test <te...@sa-test.spamassassin.org>
+To: undisclosed-recipients:;
+Subject: test message 19
+X-Foobar: it's really test 23 with crlf only in the end test
+Message-ID: <4A...@spamassassin.org>
+Date: Mon, 08 Jun 2009 12:00:00 +0000
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+testing

Added: spamassassin/trunk/t/data/nice/spf5-received-spf-crlf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/nice/spf5-received-spf-crlf?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/nice/spf5-received-spf-crlf (added)
+++ spamassassin/trunk/t/data/nice/spf5-received-spf-crlf Mon Jan 27 12:48:06 2020
@@ -0,0 +1,56 @@
+Return-Path: <ne...@dnsbltest.spamassassin.org>
+X-Comment: Yeah, the Received-SPF headers make no sense,
+ there just there to test that the SPF plugin will parse the results from
+ them... the IPs and comments are bogus
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.158]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [64.142.3.173]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received-SPF: fail (dostech.ca: 69.61.78.188 is authorized to use
+ 'spamassassin@dostech.ca' in 'mfrom' identity (mechanism 'mx' matched))
+ receiver=FC5-VPC; identity=mfrom; envelope-from="spamassassin@dostech.ca";
+ helo=smtp.dostech.net; client-ip=69.61.78.188
+Received-SPF: softfail (dostech.ca: 69.61.78.188 is authorized to use
+ 'dostech.ca' in 'helo' identity (mechanism 'mx' matched)) receiver=FC5-VPC;
+ identity=helo; helo=dostech.ca; client-ip=69.61.78.188
+Received-SPF: neutral (herse.apache.org: domain of spamassassin@dostech.ca
+ designates 69.61.78.188 as permitted sender)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.155]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.156]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.157]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for
+ <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: by proxy.google.com with SMTP id so1951389 for
+ <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+Received: by abbulk2 with SMTP id mr733125; Tue,
+ 10 Feb 2004 10:14:01 -0800 (PST)
+Message-ID: <10...@persist.google.com>
+Date: Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+From: newsalerts-noreply@dnsbltest.spamassassin.org
+To: jm-google-news-alerts@jmason.org
+Subject: Google News Alert - spamassassin
+MIME-Version: 1.0
+Content-Type: text/plain; charset="ISO-8859-1";
+
+SWSOFT Unveils Plesk 7, Deployed by 1&1
+Web Host Industry Review - USA
+... The software also features a newly designed Windows XP-like user interface,
+is equipped SpamAssassin, an open source anti-spam tool, and includes
+"Application ...
+<http://thewhir.com/marketwatch/sws021004.cfm>
+See all stories on this topic:
+<http://news.google.com/news?hl=en&lr=&ie=UTF-8&oe=utf8&client=google&num=30&newsc
+lusterurl=http://thewhir.com/marketwatch/sws021004.cfm>
+
+"v=spf1 ip4:64.142.3.173 -ip4:65.214.43.155 ~ip4:65.214.43.156 ?ip4:65.214.43.157 -all"
+

Added: spamassassin/trunk/t/data/nice/spf6-received-spf-crlf2
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/nice/spf6-received-spf-crlf2?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/nice/spf6-received-spf-crlf2 (added)
+++ spamassassin/trunk/t/data/nice/spf6-received-spf-crlf2 Mon Jan 27 12:48:06 2020
@@ -0,0 +1,56 @@
+Return-Path: <ne...@dnsbltest.spamassassin.org>
+X-Comment: Yeah, the Received-SPF headers make no sense,
+ there just there to test that the SPF plugin will parse the results from
+ them... the IPs and comments are bogus
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.158]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [64.142.3.173]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received-SPF: fail (dostech.ca: 69.61.78.188 is authorized to use
+ 'spamassassin@dostech.ca' in 'mfrom' identity (mechanism 'mx' matched))
+ receiver=FC5-VPC; identity=mfrom; envelope-from="spamassassin@dostech.ca";
+ helo=smtp.dostech.net; client-ip=69.61.78.188
+Received-SPF: softfail (dostech.ca: 69.61.78.188 is authorized to use
+ 'dostech.ca' in 'helo' identity (mechanism 'mx' matched)) receiver=FC5-VPC;
+ identity=helo; helo=dostech.ca; client-ip=69.61.78.188
+Received-SPF: neutral (herse.apache.org: domain of spamassassin@dostech.ca
+ designates 69.61.78.188 as permitted sender)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.155]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.156]) by dnsbltest.spamassassin.org (Postfix) with SMTP id
+ B9B2931016D for <jm...@jmason.org>; Tue,
+ 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org
+ [65.214.43.157]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for
+ <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: by proxy.google.com with SMTP id so1951389 for
+ <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+Received: by abbulk2 with SMTP id mr733125; Tue,
+ 10 Feb 2004 10:14:01 -0800 (PST)
+Message-ID: <10...@persist.google.com>
+Date: Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+From: newsalerts-noreply@dnsbltest.spamassassin.org
+To: jm-google-news-alerts@jmason.org
+Subject: Google News Alert - spamassassin
+MIME-Version: 1.0
+Content-Type: text/plain; charset="ISO-8859-1";
+
+SWSOFT Unveils Plesk 7, Deployed by 1&1
+Web Host Industry Review - USA
+... The software also features a newly designed Windows XP-like user interface,
+is equipped SpamAssassin, an open source anti-spam tool, and includes
+"Application ...
+<http://thewhir.com/marketwatch/sws021004.cfm>
+See all stories on this topic:
+<http://news.google.com/news?hl=en&lr=&ie=UTF-8&oe=utf8&client=google&num=30&newsc
+lusterurl=http://thewhir.com/marketwatch/sws021004.cfm>
+
+"v=spf1 ip4:64.142.3.173 -ip4:65.214.43.155 ~ip4:65.214.43.156 ?ip4:65.214.43.157 -all"
+

Added: spamassassin/trunk/t/data/spam/gtubedcc_crlf.eml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/data/spam/gtubedcc_crlf.eml?rev=1873207&view=auto
==============================================================================
--- spamassassin/trunk/t/data/spam/gtubedcc_crlf.eml (added)
+++ spamassassin/trunk/t/data/spam/gtubedcc_crlf.eml Mon Jan 27 12:48:06 2020
@@ -0,0 +1,32 @@
+Received: from [192.168.1.1]
+ by mail.example.com with SMTP id gQQvHEt9CmmU
+ for <re...@example.com>; Mon, 07 Oct 2002 09:00:01 +0000
+Message-ID: <GT...@example.com>
+Date: Mon, 07 Oct 2002 09:00:00 +0000
+From: Sender <se...@example.com>
+MIME-Version: 1.0
+To: Recipient <re...@example.com>
+Subject: GTUBE
+Content-Type: text/plain; charset=us-ascii; format=flowed
+Content-Transfer-Encoding: 7bit
+
+XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
+
+Generic
+Test for
+Unsolicited
+Bulk
+Email
+
+Repeated to ensure that DCC fuzzy match sees this as unique
+
+XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
+
+Generic
+Test for
+Unsolicited
+Bulk
+Email
+
+Repeated to ensure that DCC fuzzy match sees this as unique
+

Modified: spamassassin/trunk/t/dcc.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/dcc.t?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/t/dcc.t (original)
+++ spamassassin/trunk/t/dcc.t Mon Jan 27 12:48:06 2020
@@ -9,7 +9,7 @@ use Test::More;
 plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests');
 plan skip_all => "DCC tests disabled" unless conf_bool('run_dcc_tests');
 plan skip_all => "DCC executable not found in path" unless HAS_DCC;
-plan tests => 4;
+plan tests => 8;
 
 diag('Note: Failure may not be an SpamAssassin bug, as DCC tests can fail due to problems with the DCC servers.');
 
@@ -31,6 +31,8 @@ tstpre ("
 
 ok sarun ("-t -D info -r < data/spam/gtubedcc.eml 2>&1", \&patterns_run_cb);
 ok_all_patterns();
+ok sarun ("-t -D info -r < data/spam/gtubedcc_crlf.eml 2>&1", \&patterns_run_cb);
+ok_all_patterns();
 
 %patterns = (
 
@@ -40,3 +42,5 @@ ok_all_patterns();
 
 ok sarun ("-t < data/spam/gtubedcc.eml", \&patterns_run_cb);
 ok_all_patterns();
+ok sarun ("-t < data/spam/gtubedcc_crlf.eml", \&patterns_run_cb);
+ok_all_patterns();

Modified: spamassassin/trunk/t/dkim.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/dkim.t?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/t/dkim.t (original)
+++ spamassassin/trunk/t/dkim.t Mon Jan 27 12:48:06 2020
@@ -17,7 +17,7 @@ use constant HAS_DKIM_VERIFIER => eval {
 use Test::More;
 plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests');
 plan skip_all => "Needs Mail::DKIM::Verifier >= 0.31" unless HAS_DKIM_VERIFIER ;
-plan tests => 226;
+plan tests => 258;
 
 BEGIN {
   if (-e 't/test_dir') {

Modified: spamassassin/trunk/t/spf.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spf.t?rev=1873207&r1=1873206&r2=1873207&view=diff
==============================================================================
--- spamassassin/trunk/t/spf.t (original)
+++ spamassassin/trunk/t/spf.t Mon Jan 27 12:48:06 2020
@@ -11,7 +11,7 @@ plan skip_all => "Net tests disabled" un
 plan skip_all => "Need Mail::SPF" unless HAS_MAILSPF;
 plan skip_all => "Can't use Net::DNS Safely" unless can_use_net_dns_safely();
 
-plan tests => 64;
+plan tests => 68;
 
 # ---------------------------------------------------------------------------
 
@@ -380,6 +380,12 @@ ok_all_patterns();
 # Test same with nonfolded headers
 sarun ("-t < data/nice/spf4-received-spf-nofold", \&patterns_run_cb);
 ok_all_patterns();
+# Test same with crlf line endings
+sarun ("-t < data/nice/spf5-received-spf-crlf", \&patterns_run_cb);
+ok_all_patterns();
+# Test same with crlf line endings (bug 7785)
+sarun ("-t < data/nice/spf6-received-spf-crlf2", \&patterns_run_cb);
+ok_all_patterns();
 
 
 # test usage of Received-SPF headers added by internal relays