summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/confs/400333
-rw-r--r--test/confs/40082
-rw-r--r--test/log/40034
-rw-r--r--test/scripts/4000-scanning/400351
-rw-r--r--test/src/server.c17
-rw-r--r--test/stdout/400347
6 files changed, 3 insertions, 151 deletions
diff --git a/test/confs/4003 b/test/confs/4003
deleted file mode 100644
index 1d00cc695..000000000
--- a/test/confs/4003
+++ /dev/null
@@ -1,33 +0,0 @@
-# Exim test configuration 4003
-# Content-scan: rspamd interface
-
-.include DIR/aux-var/std_conf_prefix
-
-log_selector = +subject
-primary_hostname = myhost.test.ex
-
-spamd_address = 127.0.0.1 11333 variant=rspamd
-
-# ----- Main settings -----
-
-acl_smtp_rcpt = accept
-acl_smtp_data = c_data
-
-begin acl
-
-c_data:
- warn
- spam = nobody
- warn
- log_message = $spam_action $spam_report
- accept
-
-# ----- Routers -----
-
-begin routers
-
-r:
- driver = redirect
- data = :blackhole:
-
-# End
diff --git a/test/confs/4008 b/test/confs/4008
index 1ec1b85fe..e10c2c024 100644
--- a/test/confs/4008
+++ b/test/confs/4008
@@ -1,5 +1,5 @@
# Exim test configuration 4008
-# Content-scan: cmsline interface
+# Content-scan: cmdline interface
.include DIR/aux-var/std_conf_prefix
diff --git a/test/log/4003 b/test/log/4003
deleted file mode 100644
index d8bbb9b18..000000000
--- a/test/log/4003
+++ /dev/null
@@ -1,4 +0,0 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER Warning: reject Action: reject\n Symbol: FAKE_SYMBOL_A(15.00)\n Symbol: FAKE_SYMBOL_B(0.00)\n Message-ID: undef
-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
diff --git a/test/scripts/4000-scanning/4003 b/test/scripts/4000-scanning/4003
deleted file mode 100644
index e5a7c9492..000000000
--- a/test/scripts/4000-scanning/4003
+++ /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/src/server.c b/test/src/server.c
index d433ebe0e..719350c15 100644
--- a/test/src/server.c
+++ b/test/src/server.c
@@ -519,11 +519,6 @@ s = script;
for (count = 0; count < connection_count; count++)
{
- struct {
- int left;
- BOOL in_use;
- } content_length = { 0, FALSE };
-
alarm(timeout);
if (port <= 0)
{
@@ -734,7 +729,6 @@ for (count = 0; count < connection_count; count++)
alarm(timeout);
n = read(dup_accept_socket, CS buffer+offset, s->len - offset);
- if (content_length.in_use) content_length.left -= n;
if (n == 0)
{
printf("%sxpected EOF read from client\n",
@@ -752,9 +746,8 @@ for (count = 0; count < connection_count; count++)
if (data) do
{
n = (read(dup_accept_socket, &c, 1) == 1 && c == '.');
- if (content_length.in_use) content_length.left--;
while (c != '\n' && read(dup_accept_socket, &c, 1) == 1)
- if (content_length.in_use) content_length.left--;
+ ;
} while (!n);
else if (memcmp(ss, buffer, n) != 0)
{
@@ -777,8 +770,7 @@ for (count = 0; count < connection_count; count++)
goto END_OFF;
}
alarm(0);
- n = strlen(CS buffer);
- if (content_length.in_use) content_length.left -= (n - offset);
+ n = (int)strlen(CS buffer);
while (n > 0 && isspace(buffer[n-1])) n--;
buffer[n] = 0;
printf("%s\n", buffer);
@@ -792,11 +784,6 @@ for (count = 0; count < connection_count; count++)
break;
}
}
-
- if (sscanf(CCS buffer, "<Content-length: %d", &content_length.left))
- content_length.in_use = TRUE;
- if (content_length.in_use && content_length.left <= 0)
- shutdown(dup_accept_socket, SHUT_RD);
}
}
diff --git a/test/stdout/4003 b/test/stdout/4003
deleted file mode 100644
index afff4e4df..000000000
--- a/test/stdout/4003
+++ /dev/null
@@ -1,47 +0,0 @@
-220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-250-myhost.test.ex Hello CALLER at test.ex
-250-SIZE 52428800
-250-8BITMIME
-250-PIPELINING
-250 HELP
-250 OK
-250 Accepted
-354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaX-0005vi-00
-221 myhost.test.ex closing connection
-
-******** SERVER ********
-Listening on port 11333 ...
-Connection request from [127.0.0.1]
-<CHECK RSPAMC/1.3
-<Content-length: ddd
-<Queue-Id: 10HmaX-0005vi-00
-<From: <CALLER@myhost.test.ex>
-<Recipient-Number: 1
-<Rcpt: <userx@test.ex>
-<Helo: test.ex
-<User: CALLER
-<
-<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
-<From: MAILER_DAEMON <>
-<Content-type: text/plain
-<Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
-<Sender: CALLER_NAME <CALLER@myhost.test.ex>
-<Date: Tue, 2 Mar 1999 09:44:33 +0000
-<
-<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
-Expected EOF read from client
-End of script