summaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-01-01 13:14:41 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-01-01 17:10:23 +0000
commitc11d665dab975691024f9231ad93c65bef7e5df4 (patch)
treeac2a5701c6511c08266c4fb122e71a481a73bfc2 /test/scripts
parentadf73d3717be93cdbbb38c7e2e4bb0531d1cca27 (diff)
Feature macros, show-supported and build-time selection for malware interfaces
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/4000-scanning/400197
-rw-r--r--test/scripts/4000-scanning/4002316
-rw-r--r--test/scripts/4000-scanning/4003165
-rw-r--r--test/scripts/4000-scanning/400851
-rw-r--r--test/scripts/4000-scanning/4009242
-rw-r--r--test/scripts/4000-scanning/401038
-rw-r--r--test/scripts/4006_scan_clamd/4006 (renamed from test/scripts/4000-scanning/4005)0
-rw-r--r--test/scripts/4006_scan_clamd/REQUIRES2
-rw-r--r--test/scripts/4007_scan_avast/4007 (renamed from test/scripts/4000-scanning/4006)0
-rw-r--r--test/scripts/4007_scan_avast/REQUIRES2
-rw-r--r--test/scripts/4008_scan_cmdline/4008 (renamed from test/scripts/4000-scanning/4007)0
-rw-r--r--test/scripts/4008_scan_cmdline/REQUIRES2
-rw-r--r--test/scripts/4009_scan_sophie/4009 (renamed from test/scripts/4000-scanning/4004)0
-rw-r--r--test/scripts/4009_scan_sophie/REQUIRES2
-rw-r--r--test/scripts/4010_scan_fsecure/4010134
-rw-r--r--test/scripts/4010_scan_fsecure/REQUIRES2
-rw-r--r--test/scripts/4011_scan_ave/4011168
-rw-r--r--test/scripts/4011_scan_ave/REQUIRES2
-rw-r--r--test/scripts/4012_scan_fprotd/401295
-rw-r--r--test/scripts/4012_scan_fprotd/REQUIRES2
-rw-r--r--test/scripts/4013_scan_fprot6d/4013 (renamed from test/scripts/4000-scanning/4011)0
-rw-r--r--test/scripts/4013_scan_fprot6d/REQUIRES2
-rw-r--r--test/scripts/4014_scan_sock/4014 (renamed from test/scripts/4000-scanning/4012)0
-rw-r--r--test/scripts/4014_scan_sock/REQUIRES2
24 files changed, 671 insertions, 653 deletions
diff --git a/test/scripts/4000-scanning/4001 b/test/scripts/4000-scanning/4001
index 6f746307e..a660f6805 100644
--- a/test/scripts/4000-scanning/4001
+++ b/test/scripts/4000-scanning/4001
@@ -1,95 +1,38 @@
-# content scan interface: f-protd
-need_ipv4
-munge loopback
-#
-server PORT_S
-<GET
-<
-><summary code="11">
->*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted
-
-.
-quit
-****
-#
-#
-#
-server PORT_S
-<GET
-<
->
->
->
-><detected type="foo">
-><name>wibble</name>
-><summary code="11">
->*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be rejected
-
-due to the server response (above)
-.
-quit
-****
-#
-#
-#
-server PORT_S
-<GET
-*sleep 3
-****
-#
+# ACL regex= test
#
+# These tests are copies from testcase 4000;
+# they should be removed from there but I don't
+# run spamassassin so can't verify the change.
#
-exim -odi -bs -DOPT="/tmo=2s"
+exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be deferred due to timeout
+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
****
-#
-#
-#
-server PORT_S
-<GET
-*sleep 3
-****
-#
-#
-#
-exim -odi -bs -DOPT="/tmo=2s/defer_ok"
+exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted despite timeout
+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 gazornenplaz REGEX.
.
quit
****
diff --git a/test/scripts/4000-scanning/4002 b/test/scripts/4000-scanning/4002
index 4754609c0..d9849c341 100644
--- a/test/scripts/4000-scanning/4002
+++ b/test/scripts/4000-scanning/4002
@@ -1,168 +1,242 @@
-# content scan interface: aveserver
-#
-server DIR/eximdir/aveserver_sock
->200 ready
-<SCAN
->200 done
-<quit
->200 ready
+# content scan interface: spamassassin
+#
+# The spooled file for scanning includes the test-runner's user name
+# hence size varies. Munge that.
+munge scanfile_size
+#
+#
+# A good-comms test, returning not-spam.
+# (we could use a second one that returns is-spam...)
+server 7833
+<REPORT SPAMC
+<User:
+<Content-length:
+<
+<From
+<X-Envelope-From
+<X-Envelope-To
+<Received:
+< by
+< (envelope
+< id
+< for
+<Content-type: text/plain
+<Message-Id:
+<From:
+<Date:
+<
+<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
+>
*eof
****
-#
-#
-#
-exim -odi -bs -DOPT=
+exim -odi -oMt fromuser -bs
ehlo test.ex
-mail from:<>
+mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted
+Content-type: text/plain
+test
.
quit
****
#
#
#
-server DIR/eximdir/aveserver_sock
->2xx ready
-<SCAN
->5xx defer
-<quit
->2xx ready
-*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: defer this one (daemon tmp-err)
-
-.
-quit
-****
-#
-#
#
-server DIR/eximdir/aveserver_sock
->2xx ready
-<SCAN
->322 VNAME found
->2xx ready
-<quit
->2xx ready
+# Server spec line with timeout option, not exercised
+# (could we cut down the massive content?)
+server 7833
+<REPORT SPAMC
+<User:
+<Content-length:
+<
+<From
+<X-Envelope-From
+<X-Envelope-To
+<Received:
+< by
+< (envelope
+< id
+< for
+<Content-type: text/plain
+<Message-Id:
+<From:
+<Date:
+<
+<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
+>
*eof
****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be rejected (virus found)
-
-.
-quit
-****
-#
-#
-#
-server DIR/eximdir/aveserver_sock
-*sleep 3
-****
-#
-#
-#
-exim -odi -bs -DOPT="/tmo=2s"
+exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=10s'
ehlo test.ex
-mail from:<>
+mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be deferred due to timeout
+Content-type: text/plain
+test
.
quit
****
#
#
#
-server DIR/eximdir/aveserver_sock
-*sleep 3
+# Server spec line with timeout option, exercised
+server -i 2 7833
+<REPORT SPAMC
+<User:
+<Content-length:
+<
+<From
+<X-Envelope-From
+<X-Envelope-To
+<Received:
+< by
+< (envelope
+< id
+< for
+<Content-type: text/plain
+<Message-Id:
+<From:
+<Date:
+<
+<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
+>
+*eof
****
-#
-#
-#
-exim -odi -bs -DOPT="/tmo=2s / defer_ok"
+exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=4s'
ehlo test.ex
-mail from:<>
+mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted despite timeout
+Content-type: text/plain
+test
.
quit
****
#
#
#
-server DIR/eximdir/aveserver_sock
->2xx ready
-<SCAN
->5xx defer
-<quit
->2xx ready
+# Multiple servers, prioritised, with timeout spec; first one fails
+# List separator changed
+server 7833
+<REPORT SPAMC
+<User:
+<Content-length:
+<
+<From
+<X-Envelope-From
+<X-Envelope-To
+<Received:
+< by
+< (envelope
+< id
+< for
+<Content-type: text/plain
+<Message-Id:
+<From:
+<Date:
+<
+<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
+>
*eof
****
-#
-#
-#
-exim -odi -bs -DOPT=" / defer_ok"
+exim -odi -oMt fromuser -bs -DOPT='<; 127.0.0.1 7833 ; HOSTIPV4 7834 pri=2 tmo=2s'
ehlo test.ex
-mail from:<>
+mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: accept this, overriding the scan daemon temp-error
+Content-type: text/plain
+test
.
quit
****
#
#
-#
-# Recheck that defer_ok option does not affect a malware detection
-#
-server DIR/eximdir/aveserver_sock
->2xx ready
-<SCAN
->322 VNAME found
->2xx ready
-<quit
->2xx ready
-*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT="/defer_ok"
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be rejected (virus found)
-
-.
-quit
-****
diff --git a/test/scripts/4000-scanning/4003 b/test/scripts/4000-scanning/4003
index 49d331bf1..e5a7c9492 100644
--- a/test/scripts/4000-scanning/4003
+++ b/test/scripts/4000-scanning/4003
@@ -1,134 +1,51 @@
-# content scan interface: fsecure
-# also testing alternate list separator for malware= args
-#
-server DIR/eximdir/fsec_sock
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<SCAN
->LF>random ignored line
->LF>random ignored line 2
->LF>OK Scan ok.
-*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted
-
-.
-quit
-****
-#
-#
-#
-server DIR/eximdir/fsec_sock
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<SCAN
->LF>xxxINFECTED blah VNAME blah
->LF>OK Scan ok.
-*eof
-****
-#
-#
-#
-exim -odi -bs -DOPT=
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be rejected
-
-.
-quit
-****
-#
-#
-#
-server DIR/eximdir/fsec_sock
-*sleep 3
-****
-#
-#
-#
-exim -odi -bs -DOPT=";tmo=2s"
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be tmp-rejected due to timeout
-
-.
-quit
-****
-#
-#
-#
-server DIR/eximdir/fsec_sock
-*sleep 3
-****
-#
-#
-#
-exim -odi -bs -DOPT=";defer_ok;tmo=2s"
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be accepted despite timeout
-
-.
-quit
-****
-#
-#
-#
-server DIR/eximdir/fsec_sock
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<CONFIGURE
->ignored_response
-<SCAN
->LF>xxxINFECTED blah VNAME blah
->LF>OK Scan ok.
+# content scan interface: rspamd
+#
+# The spooled file for scanning includes the test-runner's user name
+# hence size varies. Munge that.
+munge scanfile_size
+#
+server 11333
+<CHECK RSPAMC/1.3
+<Content-length:
+<Queue-Id:
+<From:
+<Recipient-Number: 1
+<Rcpt:
+<Helo:
+<User:
+<
+<From
+<X-Envelope-From
+<X-Envelope-To
+<Received:
+< by
+< (envelope
+< id
+< for
+<From:
+<Content-type: text/plain
+<Message-Id:
+<Sender:
+<Date:
+<
+<test
+>RSPAMD/1.3 0 EX_OK
+>Metric: default; True; 15.00 / 15.00 / 0.0
+>Action: reject
+>Symbol: FAKE_SYMBOL_A(15.00)
+>Symbol: FAKE_SYMBOL_B(0.00)
+>Message-ID: undef
*eof
****
-#
-#
-#
-exim -odi -bs -DOPT="; defer_ok ; tmo=5h"
+exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<userx@test.ex>
data
-Date: Fri, 17 Dec 2004 14:35:01 +0100
-Subject: message should be rejected as the options are not relevant
+From: MAILER_DAEMON <>
+Content-type: text/plain
+test
.
quit
****
diff --git a/test/scripts/4000-scanning/4008 b/test/scripts/4000-scanning/4008
deleted file mode 100644
index e5a7c9492..000000000
--- a/test/scripts/4000-scanning/4008
+++ /dev/null
@@ -1,51 +0,0 @@
-# content scan interface: rspamd
-#
-# The spooled file for scanning includes the test-runner's user name
-# hence size varies. Munge that.
-munge scanfile_size
-#
-server 11333
-<CHECK RSPAMC/1.3
-<Content-length:
-<Queue-Id:
-<From:
-<Recipient-Number: 1
-<Rcpt:
-<Helo:
-<User:
-<
-<From
-<X-Envelope-From
-<X-Envelope-To
-<Received:
-< by
-< (envelope
-< id
-< for
-<From:
-<Content-type: text/plain
-<Message-Id:
-<Sender:
-<Date:
-<
-<test
->RSPAMD/1.3 0 EX_OK
->Metric: default; True; 15.00 / 15.00 / 0.0
->Action: reject
->Symbol: FAKE_SYMBOL_A(15.00)
->Symbol: FAKE_SYMBOL_B(0.00)
->Message-ID: undef
-*eof
-****
-exim -odi -bs
-ehlo test.ex
-mail from:<>
-rcpt to:<userx@test.ex>
-data
-From: MAILER_DAEMON <>
-Content-type: text/plain
-
-test
-.
-quit
-****
diff --git a/test/scripts/4000-scanning/4009 b/test/scripts/4000-scanning/4009
deleted file mode 100644
index d9849c341..000000000
--- a/test/scripts/4000-scanning/4009
+++ /dev/null
@@ -1,242 +0,0 @@
-# content scan interface: spamassassin
-#
-# The spooled file for scanning includes the test-runner's user name
-# hence size varies. Munge that.
-munge scanfile_size
-#
-#
-# A good-comms test, returning not-spam.
-# (we could use a second one that returns is-spam...)
-server 7833
-<REPORT SPAMC
-<User:
-<Content-length:
-<
-<From
-<X-Envelope-From
-<X-Envelope-To
-<Received:
-< by
-< (envelope
-< id
-< for
-<Content-type: text/plain
-<Message-Id:
-<From:
-<Date:
-<
-<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
->
-*eof
-****
-exim -odi -oMt fromuser -bs
-ehlo test.ex
-mail from:<fromuser@myhost.test.ex>
-rcpt to:<userx@test.ex>
-data
-Content-type: text/plain
-
-test
-.
-quit
-****
-#
-#
-#
-#
-# Server spec line with timeout option, not exercised
-# (could we cut down the massive content?)
-server 7833
-<REPORT SPAMC
-<User:
-<Content-length:
-<
-<From
-<X-Envelope-From
-<X-Envelope-To
-<Received:
-< by
-< (envelope
-< id
-< for
-<Content-type: text/plain
-<Message-Id:
-<From:
-<Date:
-<
-<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
->
-*eof
-****
-exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=10s'
-ehlo test.ex
-mail from:<fromuser@myhost.test.ex>
-rcpt to:<userx@test.ex>
-data
-Content-type: text/plain
-
-test
-.
-quit
-****
-#
-#
-#
-# Server spec line with timeout option, exercised
-server -i 2 7833
-<REPORT SPAMC
-<User:
-<Content-length:
-<
-<From
-<X-Envelope-From
-<X-Envelope-To
-<Received:
-< by
-< (envelope
-< id
-< for
-<Content-type: text/plain
-<Message-Id:
-<From:
-<Date:
-<
-<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
->
-*eof
-****
-exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=4s'
-ehlo test.ex
-mail from:<fromuser@myhost.test.ex>
-rcpt to:<userx@test.ex>
-data
-Content-type: text/plain
-
-test
-.
-quit
-****
-#
-#
-#
-# Multiple servers, prioritised, with timeout spec; first one fails
-# List separator changed
-server 7833
-<REPORT SPAMC
-<User:
-<Content-length:
-<
-<From
-<X-Envelope-From
-<X-Envelope-To
-<Received:
-< by
-< (envelope
-< id
-< for
-<Content-type: text/plain
-<Message-Id:
-<From:
-<Date:
-<
-<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
->
-*eof
-****
-exim -odi -oMt fromuser -bs -DOPT='<; 127.0.0.1 7833 ; HOSTIPV4 7834 pri=2 tmo=2s'
-ehlo test.ex
-mail from:<fromuser@myhost.test.ex>
-rcpt to:<userx@test.ex>
-data
-Content-type: text/plain
-
-test
-.
-quit
-****
-#
-#
diff --git a/test/scripts/4000-scanning/4010 b/test/scripts/4000-scanning/4010
deleted file mode 100644
index a660f6805..000000000
--- a/test/scripts/4000-scanning/4010
+++ /dev/null
@@ -1,38 +0,0 @@
-# ACL regex= test
-#
-# These tests are copies from testcase 4000;
-# they should be removed from there but I don't
-# run spamassassin so can't verify the change.
-#
-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: 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 gazornenplaz REGEX.
-.
-quit
-****
diff --git a/test/scripts/4000-scanning/4005 b/test/scripts/4006_scan_clamd/4006
index d251c1a1f..d251c1a1f 100644
--- a/test/scripts/4000-scanning/4005
+++ b/test/scripts/4006_scan_clamd/4006
diff --git a/test/scripts/4006_scan_clamd/REQUIRES b/test/scripts/4006_scan_clamd/REQUIRES
new file mode 100644
index 000000000..0a1e8374e
--- /dev/null
+++ b/test/scripts/4006_scan_clamd/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware clamd
diff --git a/test/scripts/4000-scanning/4006 b/test/scripts/4007_scan_avast/4007
index a58188c95..a58188c95 100644
--- a/test/scripts/4000-scanning/4006
+++ b/test/scripts/4007_scan_avast/4007
diff --git a/test/scripts/4007_scan_avast/REQUIRES b/test/scripts/4007_scan_avast/REQUIRES
new file mode 100644
index 000000000..d5a69793c
--- /dev/null
+++ b/test/scripts/4007_scan_avast/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware avast
diff --git a/test/scripts/4000-scanning/4007 b/test/scripts/4008_scan_cmdline/4008
index 9684056a0..9684056a0 100644
--- a/test/scripts/4000-scanning/4007
+++ b/test/scripts/4008_scan_cmdline/4008
diff --git a/test/scripts/4008_scan_cmdline/REQUIRES b/test/scripts/4008_scan_cmdline/REQUIRES
new file mode 100644
index 000000000..975694bc3
--- /dev/null
+++ b/test/scripts/4008_scan_cmdline/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware cmdline
diff --git a/test/scripts/4000-scanning/4004 b/test/scripts/4009_scan_sophie/4009
index 956f04507..956f04507 100644
--- a/test/scripts/4000-scanning/4004
+++ b/test/scripts/4009_scan_sophie/4009
diff --git a/test/scripts/4009_scan_sophie/REQUIRES b/test/scripts/4009_scan_sophie/REQUIRES
new file mode 100644
index 000000000..0da03b09d
--- /dev/null
+++ b/test/scripts/4009_scan_sophie/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware sophie
diff --git a/test/scripts/4010_scan_fsecure/4010 b/test/scripts/4010_scan_fsecure/4010
new file mode 100644
index 000000000..49d331bf1
--- /dev/null
+++ b/test/scripts/4010_scan_fsecure/4010
@@ -0,0 +1,134 @@
+# content scan interface: fsecure
+# also testing alternate list separator for malware= args
+#
+server DIR/eximdir/fsec_sock
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<SCAN
+>LF>random ignored line
+>LF>random ignored line 2
+>LF>OK Scan ok.
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/fsec_sock
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<SCAN
+>LF>xxxINFECTED blah VNAME blah
+>LF>OK Scan ok.
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be rejected
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/fsec_sock
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT=";tmo=2s"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be tmp-rejected due to timeout
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/fsec_sock
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT=";defer_ok;tmo=2s"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted despite timeout
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/fsec_sock
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<CONFIGURE
+>ignored_response
+<SCAN
+>LF>xxxINFECTED blah VNAME blah
+>LF>OK Scan ok.
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT="; defer_ok ; tmo=5h"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be rejected as the options are not relevant
+
+.
+quit
+****
diff --git a/test/scripts/4010_scan_fsecure/REQUIRES b/test/scripts/4010_scan_fsecure/REQUIRES
new file mode 100644
index 000000000..3b8b57b2c
--- /dev/null
+++ b/test/scripts/4010_scan_fsecure/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware fsecure
diff --git a/test/scripts/4011_scan_ave/4011 b/test/scripts/4011_scan_ave/4011
new file mode 100644
index 000000000..4754609c0
--- /dev/null
+++ b/test/scripts/4011_scan_ave/4011
@@ -0,0 +1,168 @@
+# content scan interface: aveserver
+#
+server DIR/eximdir/aveserver_sock
+>200 ready
+<SCAN
+>200 done
+<quit
+>200 ready
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>5xx defer
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: defer this one (daemon tmp-err)
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>322 VNAME found
+>2xx ready
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be rejected (virus found)
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT="/tmo=2s"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be deferred due to timeout
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT="/tmo=2s / defer_ok"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted despite timeout
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>5xx defer
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=" / defer_ok"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: accept this, overriding the scan daemon temp-error
+
+.
+quit
+****
+#
+#
+#
+# Recheck that defer_ok option does not affect a malware detection
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>322 VNAME found
+>2xx ready
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT="/defer_ok"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be rejected (virus found)
+
+.
+quit
+****
diff --git a/test/scripts/4011_scan_ave/REQUIRES b/test/scripts/4011_scan_ave/REQUIRES
new file mode 100644
index 000000000..3cfac9b6b
--- /dev/null
+++ b/test/scripts/4011_scan_ave/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware aveserver
diff --git a/test/scripts/4012_scan_fprotd/4012 b/test/scripts/4012_scan_fprotd/4012
new file mode 100644
index 000000000..6f746307e
--- /dev/null
+++ b/test/scripts/4012_scan_fprotd/4012
@@ -0,0 +1,95 @@
+# content scan interface: f-protd
+need_ipv4
+munge loopback
+#
+server PORT_S
+<GET
+<
+><summary code="11">
+>*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted
+
+.
+quit
+****
+#
+#
+#
+server PORT_S
+<GET
+<
+>
+>
+>
+><detected type="foo">
+><name>wibble</name>
+><summary code="11">
+>*eof
+****
+#
+#
+#
+exim -odi -bs -DOPT=
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be rejected
+
+due to the server response (above)
+.
+quit
+****
+#
+#
+#
+server PORT_S
+<GET
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT="/tmo=2s"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be deferred due to timeout
+
+.
+quit
+****
+#
+#
+#
+server PORT_S
+<GET
+*sleep 3
+****
+#
+#
+#
+exim -odi -bs -DOPT="/tmo=2s/defer_ok"
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: message should be accepted despite timeout
+
+.
+quit
+****
diff --git a/test/scripts/4012_scan_fprotd/REQUIRES b/test/scripts/4012_scan_fprotd/REQUIRES
new file mode 100644
index 000000000..819b11337
--- /dev/null
+++ b/test/scripts/4012_scan_fprotd/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware f-protd
diff --git a/test/scripts/4000-scanning/4011 b/test/scripts/4013_scan_fprot6d/4013
index 20e6ab2b8..20e6ab2b8 100644
--- a/test/scripts/4000-scanning/4011
+++ b/test/scripts/4013_scan_fprot6d/4013
diff --git a/test/scripts/4013_scan_fprot6d/REQUIRES b/test/scripts/4013_scan_fprot6d/REQUIRES
new file mode 100644
index 000000000..5389d9509
--- /dev/null
+++ b/test/scripts/4013_scan_fprot6d/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware f-prot6d
diff --git a/test/scripts/4000-scanning/4012 b/test/scripts/4014_scan_sock/4014
index 42d108c86..42d108c86 100644
--- a/test/scripts/4000-scanning/4012
+++ b/test/scripts/4014_scan_sock/4014
diff --git a/test/scripts/4014_scan_sock/REQUIRES b/test/scripts/4014_scan_sock/REQUIRES
new file mode 100644
index 000000000..3450a21a2
--- /dev/null
+++ b/test/scripts/4014_scan_sock/REQUIRES
@@ -0,0 +1,2 @@
+support Content_Scanning
+malware sock