diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-01-17 19:59:51 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-01-17 20:01:49 +0000 |
commit | 0cedb352e62898761b701af0c400df8ae1989383 (patch) | |
tree | d2ab6cc0c2a1c4ebfa6f469f785fe935c8593d27 /test/scripts/4006_scan_clamd | |
parent | e40f75b25322c11065dbade34e32ca177b10768c (diff) |
Testsuite: testcase for ClamAV over TCP
Diffstat (limited to 'test/scripts/4006_scan_clamd')
-rw-r--r-- | test/scripts/4006_scan_clamd/4006 | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/test/scripts/4006_scan_clamd/4006 b/test/scripts/4006_scan_clamd/4006 index d251c1a1f..91d08bd68 100644 --- a/test/scripts/4006_scan_clamd/4006 +++ b/test/scripts/4006_scan_clamd/4006 @@ -2,15 +2,16 @@ # # SCAN command interface, on a unix socket, only. No ExtendedDetectionInfo. # +# Pass server DIR/eximdir/clam_sock <SCAN >LF>scanned_file_name: OK -<*eof +*eof **** # # # -exim -odi -bs -DOPT= +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT= ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -24,15 +25,16 @@ quit # # # +# fail/error server DIR/eximdir/clam_sock <SCAN >LF>scanned_file_name: 666 ERROR -<*eof +*eof **** # # # -exim -odi -bs -DOPT= +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT= ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -46,15 +48,16 @@ quit # # # +# fail/virus-found server DIR/eximdir/clam_sock <SCAN >LF>scanned_file_name: VNAME FOUND -<*eof +*eof **** # # # -exim -odi -bs -DOPT=/defer_ok +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT=/defer_ok ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -68,13 +71,14 @@ quit # # # +# times out server DIR/eximdir/clam_sock *sleep 3 **** # # # -exim -odi -bs -DOPT="/ tmo=2s" +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT="/ tmo=2s" ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -88,13 +92,14 @@ quit # # # +# times out server DIR/eximdir/clam_sock *sleep 3 **** # # # -exim -odi -bs -DOPT="/ tmo=2s / defer_ok" +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT="/ tmo=2s / defer_ok" ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -109,13 +114,14 @@ quit # # # +# connect-fail (server not initially listenting), retry server -i 2 DIR/eximdir/clam_sock <SCAN >LF>scanned_file_name: OK -<*eof +*eof **** # -exim -odi -bs -DCONTROL="retry=4s" +exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DCONTROL="retry=4s" ehlo test.ex mail from:<> rcpt to:<userx@test.ex> @@ -127,3 +133,39 @@ Subject: message should be accepted after a retry quit **** # +################################################################################ +# +# TCP clamd server connection, default protocol +# only checks the protocol header, filesize element and start of eml file lines; +# not the post-file protocol mark +# Pass +server PORT_D +<zINSTREAM\x00\x00\x00\x01\xe5From MAILER-DAEMON +<X-Envelope-From: < +<X-Envelope-To: userx@test.ex +<Received: from +<\x09by myhost.test.ex with local-esmtp +<\x09(envelope-from < +<\x09id +<\x09for userx@test.ex; +<Date: +<Subject: message should be accepted +<Message-Id: < +<From: +< +< +>LF>scanned_file_name: OK +*eof +**** +# +exim -odi -bs -DSRV="127.0.0.1 PORT_D" -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 +**** |