From: Jeremy Harris Date: Wed, 18 Jul 2018 22:13:54 +0000 (+0100) Subject: Testsuite: restore rspamd testcase X-Git-Tag: exim-4.92-RC1~146 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=26d4893c79a0a3699ec1296332a23062c72a7795;p=exim.git Testsuite: restore rspamd testcase Missed from 611b1961b8. --- diff --git a/test/confs/4003 b/test/confs/4003 new file mode 100644 index 000000000..1d00cc695 --- /dev/null +++ b/test/confs/4003 @@ -0,0 +1,33 @@ +# 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/log/4003 b/test/log/4003 new file mode 100644 index 000000000..d8bbb9b18 --- /dev/null +++ b/test/log/4003 @@ -0,0 +1,4 @@ +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: 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 new file mode 100644 index 000000000..e5a7c9492 --- /dev/null +++ b/test/scripts/4000-scanning/4003 @@ -0,0 +1,51 @@ +# 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 +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: +data +From: MAILER_DAEMON <> +Content-type: text/plain + +test +. +quit +**** diff --git a/test/stdout/4003 b/test/stdout/4003 new file mode 100644 index 000000000..afff4e4df --- /dev/null +++ b/test/stdout/4003 @@ -0,0 +1,47 @@ +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] + + + +) +< id 10HmaX-0005vi-00 +< for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 + + + +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