Start a wishlist with notes for Exim 5
[exim.git] / test / scripts / 4006_scan_clamd / 4006
1 # content scan interface: clamav
2 #
3 # SCAN command interface, on a unix socket, only.  No ExtendedDetectionInfo.
4 #
5 # Pass
6 server DIR/eximdir/clam_sock
7 <SCAN
8 >LF>scanned_file_name: OK
9 *eof
10 ****
11 #
12 #
13 #
14 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT=
15 ehlo test.ex
16 mail from:<>
17 rcpt to:<userx@test.ex>
18 data
19 Date: Fri, 17 Dec 2004 14:35:01 +0100
20 Subject: message should be accepted
21
22 .
23 quit
24 ****
25 #
26 #
27 #
28 # fail/error
29 server DIR/eximdir/clam_sock
30 <SCAN
31 >LF>scanned_file_name: 666 ERROR
32 *eof
33 ****
34 #
35 #
36 #
37 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT=
38 ehlo test.ex
39 mail from:<>
40 rcpt to:<userx@test.ex>
41 data
42 Date: Fri, 17 Dec 2004 14:35:01 +0100
43 Subject: defer this one due to scanner error
44
45 .
46 quit
47 ****
48 #
49 #
50 #
51 # fail/virus-found
52 server DIR/eximdir/clam_sock
53 <SCAN
54 >LF>scanned_file_name: VNAME FOUND
55 *eof
56 ****
57 #
58 #
59 #
60 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT=/defer_ok
61 ehlo test.ex
62 mail from:<>
63 rcpt to:<userx@test.ex>
64 data
65 Date: Fri, 17 Dec 2004 14:35:01 +0100
66 Subject: message should be rejected
67
68 .
69 quit
70 ****
71 #
72 #
73 #
74 # times out
75 server DIR/eximdir/clam_sock
76 *sleep 3
77 ****
78 #
79 #
80 #
81 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT="/ tmo=2s"
82 ehlo test.ex
83 mail from:<>
84 rcpt to:<userx@test.ex>
85 data
86 Date: Fri, 17 Dec 2004 14:35:01 +0100
87 Subject: defer this one due to timeout
88
89 .
90 quit
91 ****
92 #
93 #
94 #
95 # times out
96 server DIR/eximdir/clam_sock
97 *sleep 3
98 ****
99 #
100 #
101 #
102 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DOPT="/ tmo=2s / defer_ok"
103 ehlo test.ex
104 mail from:<>
105 rcpt to:<userx@test.ex>
106 data
107 Date: Fri, 17 Dec 2004 14:35:01 +0100
108 Subject: accept this one despite timeout
109
110 .
111 quit
112 ****
113 #
114 #
115 #
116 #
117 # connect-fail (server not initially listenting), retry
118 server -i 2 DIR/eximdir/clam_sock
119 <SCAN
120 >LF>scanned_file_name: OK
121 *eof
122 ****
123 #
124 exim -odi -bs -DSRV=DIR/eximdir/clam_sock -DCONTROL="retry=4s"
125 ehlo test.ex
126 mail from:<>
127 rcpt to:<userx@test.ex>
128 data
129 Date: Fri, 17 Dec 2004 14:35:01 +0100
130 Subject: message should be accepted after a retry
131
132 .
133 quit
134 ****
135 #
136 ################################################################################
137 #
138 # TCP clamd server connection, default protocol
139 #  only checks the protocol header, filesize element and start of eml file lines;
140 #  not the post-file protocol mark
141 # Pass
142 server PORT_D
143 <zINSTREAM\x00\x00\x00\x01\xe5From MAILER-DAEMON
144 <X-Envelope-From: <
145 <X-Envelope-To: userx@test.ex
146 <Received: from
147 <\x09by myhost.test.ex with local-esmtp
148 <\x09(envelope-from <
149 <\x09id
150 <\x09for userx@test.ex;
151 <\x09
152 <Date:
153 <Subject: message should be accepted
154 <Message-Id: <
155 <From:
156 <
157 <
158 >LF>scanned_file_name: OK
159 *eof
160 ****
161 #
162 exim -odi -bs -DSRV="127.0.0.1 PORT_D" -DOPT=
163 ehlo test.ex
164 mail from:<>
165 rcpt to:<userx@test.ex>
166 data
167 Date: Fri, 17 Dec 2004 14:35:01 +0100
168 Subject: message should be accepted
169
170 .
171 quit
172 ****