LibreSSL: fixes pulled from OpenBSD patchset
[exim.git] / test / scripts / 4000-scanning / 4000
index d0f132ce5bac69c84b33dfdb0e7f007a9f55c550..b10f13d00c5d8d8e130c96c9f557e5175962f728 100644 (file)
@@ -1,61 +1,7 @@
-# Basic exiscan feature tests
-echo ==> This test may take a bit of time, depending on exactly
-echo ==> how your SpamAssassin is configured.
-exim -odi -bs
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-A message without any headers.
-.
-quit
-****
-exim -odi -bs
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-From: Test person <tp@cam.ac.uk>
-To: Me <userx@test.ex>
-Subject: A real test message
-Date: Fri, 17 Dec 2004 16:13:04 +0100
-Message-ID: <41C2F849.3060203@projectile.test.ex>
-
-OK, this should look like a genuine message.
-.
-quit
-****
-exim -odi -bs
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-From: 99Junk99@somewhere.com
-To:
-Subject: MAKE MONEY FAST!!!!
-Message-id: abcde
-
-This should be enough to trip the threshold.
-.
-quit
-****
-exim -odi -bs
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-From: Test person <tp@cam.ac.uk>
-To: Me <userx@test.ex>
-Subject: A real test message
-Date: Fri, 17 Dec 2004 16:13:04 +0100
-Message-ID: <41C2F849.3060203@projectile.test.ex>
-FakeReject: test fakereject
-
-OK, this should look like a genuine message, but
-it will trip on THIS REGEX.
-.
-quit
-****
+# mime boundaries
+#
+# This mail should be fine, if complex
+#
 exim -odi -bs
 ehlo test.ex
 mail from:<>
 exim -odi -bs
 ehlo test.ex
 mail from:<>
@@ -74,6 +20,16 @@ X-BeenThere: a-list00@exim.org
 X-Mailman-Version: 2.1.5
 Precedence: list
 
 X-Mailman-Version: 2.1.5
 Precedence: list
 
+--T4sUOijqQbZv57TR
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: inline
+
+Test quoted-printable =3D    
+Space at end of line=40
+Continued line =    
+with this text.
+
 --T4sUOijqQbZv57TR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 --T4sUOijqQbZv57TR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
@@ -114,13 +70,15 @@ Content-Disposition: inline
 .
 quit
 ****
 .
 quit
 ****
-# Non-smtp message 
-exim -odi userx@test.ex
-A message without any headers.
-.
-****
-# Non-smtp MIME message
-exim -odi userx@test.ex
+#
+#
+# This one has a rotten parameter, but should not induce a crash
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
 Date: Fri, 17 Dec 2004 14:35:01 +0100
 From: J Caesar <jcaesar@test.ex>
 To: a-list00@exim.org
 Date: Fri, 17 Dec 2004 14:35:01 +0100
 From: J Caesar <jcaesar@test.ex>
 To: a-list00@exim.org
@@ -128,75 +86,230 @@ Message-ID: <20041217133501.GA3058@test.ex>
 Mime-Version: 1.0
 Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
 Content-Disposition: inline
 Mime-Version: 1.0
 Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
 Content-Disposition: inline
-Subject: [exim] Re: Bug#286074: eximstats: uses message count as data for
-       the "volume" charts
-X-BeenThere: a-list00@exim.org
-X-Mailman-Version: 2.1.5
-Precedence: list
+Subject: Nasty
 
 --T4sUOijqQbZv57TR
 
 --T4sUOijqQbZv57TR
-Content-Type: text/plain; charset=us-ascii
+Content-Type: text/plain; charset=
+
+foobar
+
+--T4sUOijqQbZv57TR--
+.
+quit
+****
+#
+#
+# This one has a different rotten parameter, but should not induce a crash
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+From: J Caesar <jcaesar@test.ex>
+To: a-list00@exim.org
+Message-ID: <20041217133501.GA3059@test.ex>
+Mime-Version: 1.0
+Content-Type: text/html;
+        charset=UTF-8;
+        name=""
 Content-Disposition: inline
 Content-Disposition: inline
+Subject: Nasty
 
 
-There was a part of the patch missing, complete one is attached.
-     sorry for wasting your time
+--T4sUOijqQbZv57TR
+Content-Type: text/plain;
+
+foobar
+
+--T4sUOijqQbZv57TR--
+.
+quit
+****
+#
+#
+# This one has a 3rd rotten parameter style
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+From: J Caesar <jcaesar@test.ex>
+To: a-list00@exim.org
+Message-ID: <20041217133501.GA3059@test.ex>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="utf-8""
+Content-Disposition: inline
+Subject: Nasty3
+
+--T4sUOijqQbZv57TR
+Content-Type: text/plain;
+
+foobar
+
+--T4sUOijqQbZv57TR--
+.
+quit
+****
+#
+#
+# This one has a some unrecognised params
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+From: J Caesar <jcaesar@test.ex>
+To: a-list00@exim.org
+Message-ID: <20041217133501.GA3059@test.ex>
+Mime-Version: 1.0
+Content-Type: text/plain;
+        garbage1;
+        garbage2=foo;
+        garbage3="bar"foo;
+        charset=UTF-8;
+        garbage4=";
+Content-Disposition: inline
+Subject: Nasty4
+
+--T4sUOijqQbZv57TR
+Content-Type: text/plain;
+
+foobar
+
+--T4sUOijqQbZv57TR--
+.
+quit
+****
+#
+# This one has two attachments, using different encodings
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Message-ID: <20041217133501.GA3058@test.ex>
+Subject: Nasty5
+Mime-Version: 1.0
+Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
 
 --T4sUOijqQbZv57TR
 Content-Type: text/plain; charset=us-ascii
 
 --T4sUOijqQbZv57TR
 Content-Type: text/plain; charset=us-ascii
-Content-Disposition: attachment; filename=working-patch
+Content-Disposition: attachment; filename="=?iso-8859-1?Q?test_=E4_test1?="
 
 
---- /usr/sbin/eximstats 2004-12-17 13:36:44.381983753 +0100
-+++ eximstats  2004-12-17 13:47:37.763185260 +0100
-@@ -1107,11 +1107,11 @@
-   if (scalar @chartdatanames < $ntopchart)
-     {
-     push(@chartdatanames, $key);
--    push(@chartdatavals, $$m_count{$key});
-+    push(@chartdatavals, $$m_data{$key});
-     }
-   else
-     {
--    $chartotherval += $$m_count{$key};
-+    $chartotherval += $$m_data{$key};
-     }
-   }
- push(@chartdatanames, "Other");
+(content 1: filename is rfc2047 encoded)
 
 --T4sUOijqQbZv57TR
 
 --T4sUOijqQbZv57TR
-Content-Type: text/plain; charset="us-ascii"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: attachment; filename*=ISO-8859-1''%74%65%73%74%20%E4%20%74%65%73%74%32
 
 
--- 
+(content 2: filename is rfc2231 encoded)
 
 --T4sUOijqQbZv57TR--
 
 --T4sUOijqQbZv57TR--
+.
+quit
 ****
 ****
+#
+#
+# This one has a legit param; empty charset
+#
 exim -odi -bs
 ehlo test.ex
 mail from:<>
 rcpt to:<userx@test.ex>
 data
 exim -odi -bs
 ehlo test.ex
 mail from:<>
 rcpt to:<userx@test.ex>
 data
-From: Test person <tp@cam.ac.uk>
-To: Me <userx@test.ex>
-Subject: A real test message
-Date: Fri, 17 Dec 2004 16:13:04 +0100
-Message-ID: <41C2F849.3060203@projectile.test.ex>
-FakeDefer: test fakedefer
-
-OK, this should look like a genuine message, but
-it will trip on THIS REGEX.
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+From: J Caesar <jcaesar@test.ex>
+To: a-list00@exim.org
+Message-ID: <20041217133502.GA3059@test.ex>
+Mime-Version: 1.0
+Content-Type: application/pdf;
+ name*=''2015.11.13%20-%20Pr%C3%A4sentation%20GI%20-%20LK.PDF
+Content-Disposition: attachment;
+ filename*=''2015.11.13%20-%20Pr%C3%A4sentation%20GI%20-%20LK.PDF
+Subject: Nasty6
+
+--T4sUOijqQbZv57TR
+Content-Type: text/plain;
+
+foobar
+
+--T4sUOijqQbZv57TR--
+.
+quit
+****
+#
+#
+# As above, but with a deny from the mime acl
+#
+exim -DBAD=bad -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+From: J Caesar <jcaesar@test.ex>
+To: a-list00@exim.org
+Message-ID: <20041217133502.GA3059@test.ex>
+Mime-Version: 1.0
+Content-Type: application/pdf;
+ name*=''2015.11.13%20-%20Pr%C3%A4sentation%20GI%20-%20LK.PDF
+Content-Disposition: attachment;
+ filename*=''2015.11.13%20-%20Pr%C3%A4sentation%20GI%20-%20LK.PDF
+Subject: Nasty6
+
+--T4sUOijqQbZv57TR
+Content-Type: text/plain;
+
+foobar
+
+--T4sUOijqQbZv57TR--
 .
 quit
 ****
 .
 quit
 ****
-# Very simple virus test
+#
+#
+# Filename using parameter value continuation (RFC 2231 sec. 3)
+#
 exim -odi -bs
 exim -odi -bs
+ehlo test.ex
 mail from:<>
 rcpt to:<userx@test.ex>
 data
 mail from:<>
 rcpt to:<userx@test.ex>
 data
-Subject: a virus test
+From: localpart@test.example
+To: localpart@test.example
+Subject: Bug 3099 (2)
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----=_MIME_BOUNDARY_000_695039"
+
+------=_MIME_BOUNDARY_000_695039
+Content-Type: text/plain
+
+This is a test mailing
+------=_MIME_BOUNDARY_000_695039
+Content-Type: application/octet-stream
+Content-Disposition: attachment;
+    filename*0*="example3";
+    filename*1*=".exe"
+Content-Transfer-Encoding: BASE64
+
+QmVpc3BpZWwK
+
+------=_MIME_BOUNDARY_000_695039
+Content-Type: application/octet-stream
+Content-Disposition: attachment;
+    name*0="example4";
+    name*1=".txt"
+Content-Transfer-Encoding: BASE64
+
+QmVpc3BpZWwK
 
 
-X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
+------=_MIME_BOUNDARY_000_695039--
 .
 quit
 ****
 .
 quit
 ****