Testsuite: move regex testcase to Content-scanning section
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 22 Sep 2015 10:30:11 +0000 (11:30 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 22 Sep 2015 10:48:43 +0000 (11:48 +0100)
14 files changed:
src/src/EDITME
test/confs/0568 [deleted file]
test/confs/4010 [changed from symlink to file mode: 0644]
test/confs/4015 [new symlink]
test/log/0568 [deleted file]
test/log/4010
test/log/4015 [new file with mode: 0644]
test/mail/4010.userx [moved from test/mail/0568.userx with 100% similarity]
test/scripts/4000-scanning/4010 [moved from test/scripts/0000-Basic/0568 with 100% similarity]
test/scripts/4015-scan-ipv6/4015 [moved from test/scripts/4010-scan-ipv6/4010 with 100% similarity]
test/scripts/4015-scan-ipv6/REQUIRES [moved from test/scripts/4010-scan-ipv6/REQUIRES with 100% similarity]
test/stdout/0568 [deleted file]
test/stdout/4010
test/stdout/4015 [new file with mode: 0644]

index d481122..c2d95ff 100644 (file)
@@ -438,6 +438,7 @@ EXIM_MONITOR=eximon.bin
 
 # Uncomment the following line to add support for talking to dccifd.  This
 # defaults the socket path to /usr/local/dcc/var/dccifd.
+# Doing so will also explicitly turn on the WITH_CONTENT_SCAN option.
 
 # EXPERIMENTAL_DCC=yes
 
diff --git a/test/confs/0568 b/test/confs/0568
deleted file mode 100644 (file)
index fb1ec5d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# Exim test configuration 0568:  ACL regex=
-
-exim_path = EXIM_PATH
-host_lookup_order = bydns
-primary_hostname = myhost.test.ex
-rfc1413_query_timeout = 0s
-spool_directory = DIR/spool
-log_file_path = DIR/spool/log/%slog
-gecos_pattern = ""
-gecos_name = CALLER_NAME
-
-
-# ----- Main settings -----
-
-acl_smtp_rcpt = check_rcpt
-acl_smtp_data = check_data
-acl_not_smtp  = check_data
-
-
-# ----- ACL -----
-
-begin acl
-
-check_rcpt:
-  accept
-
-check_data:
-  warn     regex   = \N(THIS\s((\w+)\s)?REGEX)\N
-           message = X-Regex: Regex matched <$regex1> <$regex3>
-
-  warn     condition = ${if !eq{$h_fakereject:}{}}
-           control   = fakereject
-
-  warn     condition = ${if !eq{$h_fakedefer:}{}}
-           control   = fakedefer
-
-  accept
-
-# ----- Routers -----
-
-begin routers
-
-r1:
-  driver = accept
-  transport = t1
-
-# ----- Transports -----
-
-begin transports
-
-t1:
-  driver = appendfile
-  file = DIR/test-mail/$local_part
-  user = CALLER
-
-
-# End
deleted file mode 120000 (symlink)
index eb888846016ad35b20b0bc1f75c9585c44cb9a4d..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-4009
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..fb1ec5d6e9cd8300ca636dd949094e0fe512ea64
--- /dev/null
@@ -0,0 +1,57 @@
+# Exim test configuration 0568:  ACL regex=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = check_rcpt
+acl_smtp_data = check_data
+acl_not_smtp  = check_data
+
+
+# ----- ACL -----
+
+begin acl
+
+check_rcpt:
+  accept
+
+check_data:
+  warn     regex   = \N(THIS\s((\w+)\s)?REGEX)\N
+           message = X-Regex: Regex matched <$regex1> <$regex3>
+
+  warn     condition = ${if !eq{$h_fakereject:}{}}
+           control   = fakereject
+
+  warn     condition = ${if !eq{$h_fakedefer:}{}}
+           control   = fakedefer
+
+  accept
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+  driver = accept
+  transport = t1
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+  driver = appendfile
+  file = DIR/test-mail/$local_part
+  user = CALLER
+
+
+# End
diff --git a/test/confs/4015 b/test/confs/4015
new file mode 120000 (symlink)
index 0000000..eb88884
--- /dev/null
@@ -0,0 +1 @@
+4009
\ No newline at end of file
diff --git a/test/log/0568 b/test/log/0568
deleted file mode 100644 (file)
index 1ab5847..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex
-1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex
-1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
index c522ef8..1ab5847 100644 (file)
@@ -1,5 +1,6 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 spam acl condition: spamd: failed to connect to any address for ::1: Connection refused
-1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview:  test [...]\n \n Content analysis details:   (4.5 points, 5.0 required)\n \n  pts rule name              description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP\n  1.2 MISSING_HEADERS        Missing To: header\n  1.0 MISSING_FROM           Missing From: header\n  1.8 MISSING_SUBJECT        Missing Subject: header\n  1.4 MISSING_DATE           Missing Date: header\n  0.1 MISSING_MID            Missing Message-Id: header
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
-1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex
+1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
diff --git a/test/log/4015 b/test/log/4015
new file mode 100644 (file)
index 0000000..c522ef8
--- /dev/null
@@ -0,0 +1,5 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 spam acl condition: spamd: failed to connect to any address for ::1: Connection refused
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview:  test [...]\n \n Content analysis details:   (4.5 points, 5.0 required)\n \n  pts rule name              description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP\n  1.2 MISSING_HEADERS        Missing To: header\n  1.0 MISSING_FROM           Missing From: header\n  1.8 MISSING_SUBJECT        Missing Subject: header\n  1.4 MISSING_DATE           Missing Date: header\n  0.1 MISSING_MID            Missing Message-Id: header
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
similarity index 100%
rename from test/mail/0568.userx
rename to test/mail/4010.userx
diff --git a/test/stdout/0568 b/test/stdout/0568
deleted file mode 100644 (file)
index 2db3157..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
-250-myhost.test.ex Hello CALLER at test.ex\r
-250-SIZE 52428800\r
-250-8BITMIME\r
-250-PIPELINING\r
-250 HELP\r
-250 OK\r
-250 Accepted\r
-354 Enter message, ending with "." on a line by itself\r
-250 OK id=10HmaX-0005vi-00\r
-221 myhost.test.ex closing connection\r
-220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
-250-myhost.test.ex Hello CALLER at test.ex\r
-250-SIZE 52428800\r
-250-8BITMIME\r
-250-PIPELINING\r
-250 HELP\r
-250 OK\r
-250 Accepted\r
-354 Enter message, ending with "." on a line by itself\r
-550-Your message has been rejected but is being kept for evaluation.\r
-550-If it was a legitimate message, it may still be delivered to the target\r
-550 recipient(s).\r
-221 myhost.test.ex closing connection\r
index a1d7f2e..2db3157 100644 (file)
@@ -9,49 +9,16 @@
 354 Enter message, ending with "." on a line by itself\r
 250 OK id=10HmaX-0005vi-00\r
 221 myhost.test.ex closing connection\r
-
-******** SERVER ********
-Listening on port 7833 ... 
-Connection request from [127.0.0.1]
-<REPORT SPAMC/1.2
-<User: nobody
-<Content-length: 479
-<
-<From MAILER-DAEMON Tue Mar 02 09:44:33 1999
-<X-Envelope-From: <CALLER@myhost.test.ex>
-<X-Envelope-To: userx@test.ex
-<Received: from CALLER (helo=test.ex)
-<      by myhost.test.ex with local-esmtp (Exim x.yz)
-<      (envelope-from <CALLER@myhost.test.ex>)
-<      id 10HmaX-0005vi-00
-<      for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-<Content-type: text/plain
-<Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
-<From: CALLER_NAME <CALLER@myhost.test.ex>
-<Date: Tue, 2 Mar 1999 09:44:33 +0000
-<
-<test
->SPAMD/1.1 0 EX_OK
->Spam: False ; 4.5 / 5.0
->
->Spam detection software, running on the system "demo",
->has NOT identified this incoming email as spam.  The original
->message has been attached to this so you can view it or label
->similar future email.  If you have any questions, see
->@@CONTACT_ADDRESS@@ for details.
->
->Content preview:  test [...]
->
->Content analysis details:   (4.5 points, 5.0 required)
->
-> pts rule name              description
->---- ---------------------- --------------------------------------------------
->-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
-> 1.2 MISSING_HEADERS        Missing To: header
-> 1.0 MISSING_FROM           Missing From: header
-> 1.8 MISSING_SUBJECT        Missing Subject: header
-> 1.4 MISSING_DATE           Missing Date: header
-> 0.1 MISSING_MID            Missing Message-Id: header
->
-Expected EOF read from client
-End of script
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at test.ex\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+550-Your message has been rejected but is being kept for evaluation.\r
+550-If it was a legitimate message, it may still be delivered to the target\r
+550 recipient(s).\r
+221 myhost.test.ex closing connection\r
diff --git a/test/stdout/4015 b/test/stdout/4015
new file mode 100644 (file)
index 0000000..a1d7f2e
--- /dev/null
@@ -0,0 +1,57 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at test.ex\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on port 7833 ... 
+Connection request from [127.0.0.1]
+<REPORT SPAMC/1.2
+<User: nobody
+<Content-length: 479
+<
+<From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+<X-Envelope-From: <CALLER@myhost.test.ex>
+<X-Envelope-To: userx@test.ex
+<Received: from CALLER (helo=test.ex)
+<      by myhost.test.ex with local-esmtp (Exim x.yz)
+<      (envelope-from <CALLER@myhost.test.ex>)
+<      id 10HmaX-0005vi-00
+<      for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+<Content-type: text/plain
+<Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+<From: CALLER_NAME <CALLER@myhost.test.ex>
+<Date: Tue, 2 Mar 1999 09:44:33 +0000
+<
+<test
+>SPAMD/1.1 0 EX_OK
+>Spam: False ; 4.5 / 5.0
+>
+>Spam detection software, running on the system "demo",
+>has NOT identified this incoming email as spam.  The original
+>message has been attached to this so you can view it or label
+>similar future email.  If you have any questions, see
+>@@CONTACT_ADDRESS@@ for details.
+>
+>Content preview:  test [...]
+>
+>Content analysis details:   (4.5 points, 5.0 required)
+>
+> pts rule name              description
+>---- ---------------------- --------------------------------------------------
+>-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
+> 1.2 MISSING_HEADERS        Missing To: header
+> 1.0 MISSING_FROM           Missing From: header
+> 1.8 MISSING_SUBJECT        Missing Subject: header
+> 1.4 MISSING_DATE           Missing Date: header
+> 0.1 MISSING_MID            Missing Message-Id: header
+>
+Expected EOF read from client
+End of script