Testsuite: cases for malware= interfaces to f-protd, aveserver, fsecure, soophie...
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 21 Dec 2014 21:32:13 +0000 (21:32 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 21 Dec 2014 21:36:47 +0000 (21:36 +0000)
There are running against scripts not the rea thing
so only useful for spotting gross breakage.

31 files changed:
test/confs/4001 [new file with mode: 0644]
test/confs/4002 [new file with mode: 0644]
test/confs/4003 [new file with mode: 0644]
test/confs/4004 [new file with mode: 0644]
test/confs/4005 [new file with mode: 0644]
test/log/4001 [new file with mode: 0644]
test/log/4002 [new file with mode: 0644]
test/log/4003 [new file with mode: 0644]
test/log/4004 [new file with mode: 0644]
test/log/4005 [new file with mode: 0644]
test/paniclog/4002 [new file with mode: 0644]
test/paniclog/4004 [new file with mode: 0644]
test/paniclog/4005 [new file with mode: 0644]
test/rejectlog/4001 [new file with mode: 0644]
test/rejectlog/4002 [new file with mode: 0644]
test/rejectlog/4003 [new file with mode: 0644]
test/rejectlog/4004 [new file with mode: 0644]
test/rejectlog/4005 [new file with mode: 0644]
test/scripts/4000-scanning/4001 [new file with mode: 0644]
test/scripts/4000-scanning/4002 [new file with mode: 0644]
test/scripts/4000-scanning/4003 [new file with mode: 0644]
test/scripts/4000-scanning/4004 [new file with mode: 0644]
test/scripts/4000-scanning/4005 [new file with mode: 0644]
test/stderr/4002 [new file with mode: 0644]
test/stderr/4004 [new file with mode: 0644]
test/stderr/4005 [new file with mode: 0644]
test/stdout/4001 [new file with mode: 0644]
test/stdout/4002 [new file with mode: 0644]
test/stdout/4003 [new file with mode: 0644]
test/stdout/4004 [new file with mode: 0644]
test/stdout/4005 [new file with mode: 0644]

diff --git a/test/confs/4001 b/test/confs/4001
new file mode 100644 (file)
index 0000000..39e7705
--- /dev/null
@@ -0,0 +1,33 @@
+# Exim test configuration 4001
+# Content-scan: f-protd interface
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+av_scanner = f-protd : localhost PORT_S
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = c_data
+
+begin acl
+
+c_data:
+  accept !malware = *
+  deny  logwrite = malware_name $malware_name
+
+# ----- Routers -----
+
+begin routers
+
+r:
+  driver = redirect
+  data = :blackhole:
+
+# End
diff --git a/test/confs/4002 b/test/confs/4002
new file mode 100644 (file)
index 0000000..5ebb937
--- /dev/null
@@ -0,0 +1,33 @@
+# Exim test configuration 4002
+# Content-scan: aveserver interface
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+av_scanner = aveserver : DIR/eximdir/aveserver_sock
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = c_data
+
+begin acl
+
+c_data:
+  accept !malware = *
+  deny  logwrite = malware_name $malware_name
+
+# ----- Routers -----
+
+begin routers
+
+r:
+  driver = redirect
+  data = :blackhole:
+
+# End
diff --git a/test/confs/4003 b/test/confs/4003
new file mode 100644 (file)
index 0000000..e2d65ba
--- /dev/null
@@ -0,0 +1,33 @@
+# Exim test configuration 4002
+# Content-scan: fsecure interface
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+av_scanner = fsecure : DIR/eximdir/fsec_sock
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = c_data
+
+begin acl
+
+c_data:
+  accept !malware = *
+  deny  logwrite = malware_name $malware_name
+
+# ----- Routers -----
+
+begin routers
+
+r:
+  driver = redirect
+  data = :blackhole:
+
+# End
diff --git a/test/confs/4004 b/test/confs/4004
new file mode 100644 (file)
index 0000000..22cbbd0
--- /dev/null
@@ -0,0 +1,33 @@
+# Exim test configuration 4002
+# Content-scan: sophie interface
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+av_scanner = sophie : DIR/eximdir/sophie_sock
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = c_data
+
+begin acl
+
+c_data:
+  accept !malware = *
+  deny  logwrite = malware_name $malware_name
+
+# ----- Routers -----
+
+begin routers
+
+r:
+  driver = redirect
+  data = :blackhole:
+
+# End
diff --git a/test/confs/4005 b/test/confs/4005
new file mode 100644 (file)
index 0000000..6d0b797
--- /dev/null
@@ -0,0 +1,33 @@
+# Exim test configuration 4002
+# Content-scan: clamav interface
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+av_scanner = clamd : DIR/eximdir/clam_sock
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = c_data
+
+begin acl
+
+c_data:
+  accept !malware = *
+  deny  logwrite = malware_name $malware_name
+
+# ----- Routers -----
+
+begin routers
+
+r:
+  driver = redirect
+  data = :blackhole:
+
+# End
diff --git a/test/log/4001 b/test/log/4001
new file mode 100644 (file)
index 0000000..f478b27
--- /dev/null
@@ -0,0 +1,5 @@
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware_name wibble
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
diff --git a/test/log/4002 b/test/log/4002
new file mode 100644 (file)
index 0000000..5ea545d
--- /dev/null
@@ -0,0 +1,7 @@
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: aveserver: unable to scan file TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml (Responded: 5xx defer).
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+1999-03-02 09:44:33 10HmaY-0005vi-00 malware_name VNAME
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
diff --git a/test/log/4003 b/test/log/4003
new file mode 100644 (file)
index 0000000..1425f52
--- /dev/null
@@ -0,0 +1,5 @@
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware_name VNAME
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
diff --git a/test/log/4004 b/test/log/4004
new file mode 100644 (file)
index 0000000..624fb32
--- /dev/null
@@ -0,0 +1,7 @@
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: sophie: scanner reported error
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+1999-03-02 09:44:33 10HmaY-0005vi-00 malware_name VNAME
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
diff --git a/test/log/4005 b/test/log/4005
new file mode 100644 (file)
index 0000000..7e2dac2
--- /dev/null
@@ -0,0 +1,7 @@
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => :blackhole: <userx@test.ex> R=r
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: clamd: ClamAV returned: scanned_file_name: 666 ERROR
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+1999-03-02 09:44:33 10HmaY-0005vi-00 malware_name VNAME
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
diff --git a/test/paniclog/4002 b/test/paniclog/4002
new file mode 100644 (file)
index 0000000..0fd411c
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: aveserver: unable to scan file TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml (Responded: 5xx defer).
diff --git a/test/paniclog/4004 b/test/paniclog/4004
new file mode 100644 (file)
index 0000000..1b8d844
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: sophie: scanner reported error
diff --git a/test/paniclog/4005 b/test/paniclog/4005
new file mode 100644 (file)
index 0000000..12b19bc
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: clamd: ClamAV returned: scanned_file_name: 666 ERROR
diff --git a/test/rejectlog/4001 b/test/rejectlog/4001
new file mode 100644 (file)
index 0000000..bd26ac2
--- /dev/null
@@ -0,0 +1,12 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P 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
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: message should be rejected
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
diff --git a/test/rejectlog/4002 b/test/rejectlog/4002
new file mode 100644 (file)
index 0000000..2054abd
--- /dev/null
@@ -0,0 +1,24 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P 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
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: defer this one
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P Received: from CALLER (helo=test.ex)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: message should be rejected
+I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
diff --git a/test/rejectlog/4003 b/test/rejectlog/4003
new file mode 100644 (file)
index 0000000..bd26ac2
--- /dev/null
@@ -0,0 +1,12 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P 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
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: message should be rejected
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
diff --git a/test/rejectlog/4004 b/test/rejectlog/4004
new file mode 100644 (file)
index 0000000..2054abd
--- /dev/null
@@ -0,0 +1,24 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P 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
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: defer this one
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P Received: from CALLER (helo=test.ex)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: message should be rejected
+I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
diff --git a/test/rejectlog/4005 b/test/rejectlog/4005
new file mode 100644 (file)
index 0000000..2054abd
--- /dev/null
@@ -0,0 +1,24 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P 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
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: defer this one
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
+1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER F=<CALLER@myhost.test.ex> rejected after DATA
+Envelope-from: <CALLER@myhost.test.ex>
+Envelope-to: <userx@test.ex>
+P Received: from CALLER (helo=test.ex)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+  Subject: message should be rejected
+I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
diff --git a/test/scripts/4000-scanning/4001 b/test/scripts/4000-scanning/4001
new file mode 100644 (file)
index 0000000..0234a3d
--- /dev/null
@@ -0,0 +1,50 @@
+# content scan interface: f-protd
+#
+server PORT_S
+<GET
+<
+><summary code="11">
+>*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
+#
+#
+#
+server PORT_S
+<GET
+<
+>
+>
+>
+><detected type="foo">
+><name>wibble</name>
+><summary code="11">
+>*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
diff --git a/test/scripts/4000-scanning/4002 b/test/scripts/4000-scanning/4002
new file mode 100644 (file)
index 0000000..201fdf1
--- /dev/null
@@ -0,0 +1,75 @@
+# content scan interface: aveserver
+#
+server DIR/eximdir/aveserver_sock
+>200 ready
+<SCAN
+>200 done
+<quit
+>200 ready
+*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>5xx defer
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: defer this one
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/aveserver_sock
+>2xx ready
+<SCAN
+>322 VNAME found
+>2xx ready
+<quit
+>2xx ready
+*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
diff --git a/test/scripts/4000-scanning/4003 b/test/scripts/4000-scanning/4003
new file mode 100644 (file)
index 0000000..0bfa14e
--- /dev/null
@@ -0,0 +1,62 @@
+# content scan interface: fsecure
+#
+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
+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
+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
+****
diff --git a/test/scripts/4000-scanning/4004 b/test/scripts/4000-scanning/4004
new file mode 100644 (file)
index 0000000..e6a1429
--- /dev/null
@@ -0,0 +1,65 @@
+# content scan interface: sophie
+#
+server DIR/eximdir/sophie_sock
+</
+>0 no problems mate
+*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/sophie_sock
+</
+>-1 oops, internal error in scanner
+*eof
+****
+#
+#
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: defer this one
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/sophie_sock
+</
+>LF>1 VNAME
+*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
diff --git a/test/scripts/4000-scanning/4005 b/test/scripts/4000-scanning/4005
new file mode 100644 (file)
index 0000000..32a281b
--- /dev/null
@@ -0,0 +1,67 @@
+# content scan interface: clamav
+#
+# SCAN command interface, on a unix socket, only.  No ExtendedDetectionInfo.
+#
+server DIR/eximdir/clam_sock
+<SCAN
+>LF>scanned_file_name: OK
+<*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/clam_sock
+<SCAN
+>LF>scanned_file_name: 666 ERROR
+<*eof
+****
+#
+#
+#
+exim -odi -bs
+ehlo test.ex
+mail from:<>
+rcpt to:<userx@test.ex>
+data
+Date: Fri, 17 Dec 2004 14:35:01 +0100
+Subject: defer this one
+
+.
+quit
+****
+#
+#
+#
+server DIR/eximdir/clam_sock
+<SCAN
+>LF>scanned_file_name: VNAME FOUND
+<*eof
+****
+#
+#
+#
+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
+
+.
+quit
+****
diff --git a/test/stderr/4002 b/test/stderr/4002
new file mode 100644 (file)
index 0000000..0fd411c
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: aveserver: unable to scan file TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml (Responded: 5xx defer).
diff --git a/test/stderr/4004 b/test/stderr/4004
new file mode 100644 (file)
index 0000000..1b8d844
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: sophie: scanner reported error
diff --git a/test/stderr/4005 b/test/stderr/4005
new file mode 100644 (file)
index 0000000..12b19bc
--- /dev/null
@@ -0,0 +1 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 malware acl condition: clamd: ClamAV returned: scanned_file_name: 666 ERROR
diff --git a/test/stdout/4001 b/test/stdout/4001
new file mode 100644 (file)
index 0000000..2e84f98
--- /dev/null
@@ -0,0 +1,43 @@
+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=10HmaY-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 Administrative prohibition\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+<GET TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml HTTP/1.0
+<
+><summary code="11">
+>*eof
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+<GET TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml HTTP/1.0
+<
+>
+>
+>
+><detected type="foo">
+><name>wibble</name>
+><summary code="11">
+>*eof
+End of script
diff --git a/test/stdout/4002 b/test/stdout/4002
new file mode 100644 (file)
index 0000000..1987803
--- /dev/null
@@ -0,0 +1,63 @@
+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=10HmaZ-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
+451 Temporary local problem - please try later\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 Administrative prohibition\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on TESTSUITE/eximdir/aveserver_sock ... 
+Connection request
+>200 ready
+<SCAN bPQRSTUW TESTSUITE/spool/scan/10HmaZ-0005vi-00/10HmaZ-0005vi-00.eml
+>200 done
+<quit
+>200 ready
+Expected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/aveserver_sock ... 
+Connection request
+>2xx ready
+<SCAN bPQRSTUW TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml
+>5xx defer
+<quit
+>2xx ready
+Expected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/aveserver_sock ... 
+Connection request
+>2xx ready
+<SCAN bPQRSTUW TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml
+>322 VNAME found
+>2xx ready
+<quit
+>2xx ready
+Expected EOF read from client
+End of script
diff --git a/test/stdout/4003 b/test/stdout/4003
new file mode 100644 (file)
index 0000000..e0241c1
--- /dev/null
@@ -0,0 +1,55 @@
+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=10HmaY-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 Administrative prohibition\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on TESTSUITE/eximdir/fsec_sock ... 
+Connection request
+<CONFIGURE     ARCHIVE 1
+>ignored_response
+<CONFIGURE     TIMEOUT 0
+>ignored_response
+<CONFIGURE     MAXARCH 5
+>ignored_response
+<CONFIGURE     MIME    1
+>ignored_response
+<SCAN  TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml
+>LF>random ignored line
+>LF>random ignored line 2
+>LF>OK Scan ok.
+Expected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/fsec_sock ... 
+Connection request
+<CONFIGURE     ARCHIVE 1
+>ignored_response
+<CONFIGURE     TIMEOUT 0
+>ignored_response
+<CONFIGURE     MAXARCH 5
+>ignored_response
+<CONFIGURE     MIME    1
+>ignored_response
+<SCAN  TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml
+>LF>xxxINFECTED        blah    VNAME   blah
+>LF>OK Scan ok.
+Expected EOF read from client
+End of script
diff --git a/test/stdout/4004 b/test/stdout/4004
new file mode 100644 (file)
index 0000000..ceeb9e2
--- /dev/null
@@ -0,0 +1,53 @@
+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=10HmaZ-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
+451 Temporary local problem - please try later\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 Administrative prohibition\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on TESTSUITE/eximdir/sophie_sock ... 
+Connection request
+<TESTSUITE/spool/scan/10HmaZ-0005vi-00
+>0 no problems mate
+Expected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/sophie_sock ... 
+Connection request
+<TESTSUITE/spool/scan/10HmaX-0005vi-00
+>-1 oops, internal error in scanner
+Expected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/sophie_sock ... 
+Connection request
+<TESTSUITE/spool/scan/10HmaY-0005vi-00
+>LF>1 VNAME
+Expected EOF read from client
+End of script
diff --git a/test/stdout/4005 b/test/stdout/4005
new file mode 100644 (file)
index 0000000..7b7dbdc
--- /dev/null
@@ -0,0 +1,53 @@
+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=10HmaZ-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
+451 Temporary local problem - please try later\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 Administrative prohibition\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on TESTSUITE/eximdir/clam_sock ... 
+Connection request
+<SCAN TESTSUITE/spool/scan/10HmaZ-0005vi-00/10HmaZ-0005vi-00.eml
+>LF>scanned_file_name: OK
+Unexpected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/clam_sock ... 
+Connection request
+<SCAN TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml
+>LF>scanned_file_name: 666 ERROR
+Unexpected EOF read from client
+End of script
+Listening on TESTSUITE/eximdir/clam_sock ... 
+Connection request
+<SCAN TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml
+>LF>scanned_file_name: VNAME FOUND
+Unexpected EOF read from client
+End of script