spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felic...@apache.org
Subject svn commit: rev 6515 - in incubator/spamassassin/trunk/t: . data/spam
Date Thu, 05 Feb 2004 18:03:43 GMT
Author: felicity
Date: Thu Feb  5 10:03:42 2004
New Revision: 6515

Added:
   incubator/spamassassin/trunk/t/data/spam/badmime2.txt
Modified:
   incubator/spamassassin/trunk/t/mimeparse.t
Log:
more mime parsing tests

Added: incubator/spamassassin/trunk/t/data/spam/badmime2.txt
==============================================================================
--- (empty file)
+++ incubator/spamassassin/trunk/t/data/spam/badmime2.txt	Thu Feb  5 10:03:42 2004
@@ -0,0 +1,89 @@
+From odubciokci@isomedia.com  Wed Feb  4 14:23:02 2004
+Return-Path: <odubciokci@isomedia.com>
+X-Original-To: user@example.com
+Delivered-To: user@example.com
+Received: from c-24-3-96-11.client.comcast.net (c-24-3-96-11.client.comcast.net [24.3.96.11])
+	by eclectic.kluge.net (Postfix) with SMTP id 77E6C43A4CB
+	for <user@example.com>; Wed,  4 Feb 2004 14:23:01 -0500 (EST)
+Received: from  by 24.3.96.11; Thu, 05 Feb 2004 00:24:38 +0500
+From: " " <odubciokci@isomedia.com>
+Reply-To: " " <odubciokci@isomedia.com>
+To: user@example.com
+Subject: 
+Date: Wed, 04 Feb 2004 20:22:38 +0100
+MIME-Version: 1.0
+X-MimeOLE: Produced By Microsoft MimeOLE V4.72.1962.2
+Content-Type: multipart/alternative;
+	boundary=""
+Message-ID: <2wbs8otwrn5-o0ap8qij7-27odubciokci@isomedia.com>
+Status: RO
+X-Status: 
+X-Keywords:                 
+X-UID: 19276
+
+--
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 8bit
+
+           
+   
+          
+
+--
+Content-Type: text/html; charset=us-ascii
+Content-Transfer-Encoding: 8bit
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text; charset=us-ascii">
+</head>
+<body>
+<center>
+<font color=FFFFEE style="font-family: arial; font-size: 1pt;">                   
                                      .                     .                            
                  .</font>
+<table border=0 cellspacing=0 cellpadding=30 width=655>
+<tr><td bgcolor=8C8CEB align=center>
+<font size=6 face=tahoma color=ffff00><b>Cheap Soft at Damn Low Pri ce </b></font><br>
+<table border=0 cellspacing=0 cellpadding=20 width=615>
+<tr><td bgcolor=FACD33 align=center>
+<table border=1 cellspacing=0 cellpadding=10 width=595 bordercolor=000000>
+<tr><td bgcolor=FFFFFF>
+<font color=FF3E3E size=2 face="arial black">Hello friends, hope you can find cheeap
soft on our site! In our archive you can find a lot of popular programs: Adobe PhotoShop CS
8.0 only for 40$, Autodesk Building Systems 2004 (2 cds) for 40$, Borland C++ Builder 6 Enterprise
for 40$, Corel Draw 11 Graphic Suite SP1 (5 cds) only for 50$, Catia 5 R12 P3 with SP2 (3
cds) 50$, Finale 2004 (1 cd) 40$.... and a lot of more....If you want see list with all our
programs click on "Price List", or choose category which you want. </font><br><br>
+<font color=2020FF face=arial size=4>
+<font color=000000 size=4>Categories we have for now - over 328 expensive softwares
to blast off</font><br>
+Audio (Music) <font size=1 color=7F7F7F>(75 popular softwares)</font><br>
+Internet <font size=1 color=7F7F7F>(126 popular softwares)</font><br>
+Games <font size=1 color=7F7F7F>(102 popular softwares)</font><br>
+Business <font size=1 color=7F7F7F>(31 popular softwares)</font><br>
+IS/IT <font size=1 color=7F7F7F>(72 popular softwares)</font><br>
+Mobile, Palm, Pocket <font size=1 color=7F7F7F>(21 popular softwares)</font><br>
+Design, Photo, Flash, Media,Illustration <font size=1 color=7F7F7F>(89 popular softwares)</font><br>
+Web Developer <font size=1 color=7F7F7F>(56 popular softwares)</font><br>
+Software Developer <font size=1 color=7F7F7F>(45 popular softwares)</font><br>
+Utilities, Drivers, Antivirus, Security <font size=1 color=7F7F7F>(39 popular softwares)</font><br>
+Desktop Enhancements <font size=1 color=7F7F7F>(28 popular softwares)</font><br>
+Home & Education <font size=1 color=7F7F7F>( 23 popular softwares)</font><br>
+3D Studio, Adobe, Maya... Plugins <font size=1 color=7F7F7F>(50 popular softwares)</font><br>
+Video <font size=1 color=7F7F7F>(33 popular softwares)</font><br>
+CAD/CAM <font size=1 color=7F7F7F>(12 popular softwares)</font><br>
+Mac <font size=1 color=7F7F7F>(52 popular softwares)</font><br>
+& many more latest released softwares, DON'T MISS IT!
+</b></font><br><br>
+<font color=000000 size=3 face=arial>
+<b>You may pur- chase these softwares in 3 ways:</b><br>
+i) download from server (immediate download after payment)<br>
+ii) we ship you physical CDs<br>
+iii) [both of above (i) & (ii)] download from our server & we ship you the physical
CDs as backup for ur future re-installation<br><br>
+</font>
+<center>
+<b><a href=http://drs.yahoo.com/__//*%68ttp://--..org%40-.softhere.com/a/?-_ target=_blank><u><font
color=0000FF size=4 face=arial><b>L i m i t e d - t i m e offer only<br><br>Each
software offer will end after 20 copies sold<br><br>The one & only cheap softwares
bargain site on web<br><br>Don't MISS these GREAT offfers!<br><br><font
size=5>C-L-I-C-K &nbsp; H-E-R-E TO GET ONE TODAY</font></b></font></u></a><br>
+<a href=http://drs.yahoo.com/_//*%68ttp://_..com%40-_.softhere.com/a/a.cgi target=_blank><font
size=1 face=arial>r m v</font></a>
+</font>
+</center>
+</td></tr></table>
+</td></tr></table>
+</td></tr></table>
+</center>
+</body>
+</html>
+
+----

Modified: incubator/spamassassin/trunk/t/mimeparse.t
==============================================================================
--- incubator/spamassassin/trunk/t/mimeparse.t	(original)
+++ incubator/spamassassin/trunk/t/mimeparse.t	Thu Feb  5 10:03:42 2004
@@ -66,6 +66,17 @@
 	  'a0f062b1992b25de8607df1b829d29ede5687126'
 	],
 
+	"$prefix/t/data/spam/badmime.txt" => [
+	  join("\n",'multipart/alternative','text/plain','text/html'),
+	  'fe56ab5c4b0199cd2811871adc89cf2a9a3d9748',
+	  '2e7fea381fe9f0b34f947ddb7a38b81ece68605d'
+	],
+
+	"$prefix/t/data/spam/badmime2.txt" => [
+	  join("\n",'multipart/alternative','text/plain','text/html'),
+	  '05c9e1f1f3638a5191542b0c278debe38ac98a83',
+	  'e6e71e824aec0e204367bfdc9a9e227039f42815'
+	],
 );
 
 my $numtests = 0;
@@ -87,7 +98,12 @@
     foreach ( @{$files{$k}} ) {
       $res = 1;
       if ( $_ ne '' ) {
-	$res = Mail::SpamAssassin::SHA1::SHA1($parts[0]->decode());
+	if ( !defined $parts[0] ) {
+	  $res = '';
+	}
+	else {
+	  $res = Mail::SpamAssassin::SHA1::SHA1($parts[0]->decode());
+	}
 	#print ">> $res\n";
         $res = $res eq $_;
       }

Mime
View raw message