diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-05-21 21:14:05 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-05-21 21:14:05 +0100 |
commit | b0d68adc8b45e42b425c23e7dbf195b772878b9a (patch) | |
tree | cb7ff5a639d6dd9c90a454bc661217e459f6b320 /test | |
parent | 01f3091ab20e5b78419d2b7cff106b421600e553 (diff) |
Debug: "kill" option on ACL control=debug. Bug 1831
Diffstat (limited to 'test')
-rw-r--r-- | test/confs/0574 | 34 | ||||
-rw-r--r-- | test/log/0574 | 4 | ||||
-rwxr-xr-x | test/runtest | 4 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0574 | 37 | ||||
-rw-r--r-- | test/stderr/0574 | 3 | ||||
-rw-r--r-- | test/stdout/0574 | 60 |
6 files changed, 142 insertions, 0 deletions
diff --git a/test/confs/0574 b/test/confs/0574 new file mode 100644 index 000000000..6b869514a --- /dev/null +++ b/test/confs/0574 @@ -0,0 +1,34 @@ +# Exim test configuration 0574 + +exim_path = EXIM_PATH +keep_environment = +host_lookup_order = bydns +primary_hostname = myhost.test.ex +spool_directory = DIR/spool +log_file_path = DIR/spool/log/SERVER%slog +gecos_pattern = "" +gecos_name = CALLER_NAME +tls_advertise_hosts = + +# ----- Main settings ----- + +acl_smtp_mail = chk_mail +acl_smtp_rcpt = chk_rcpt +acl_smtp_data = chk_data + +queue_only + +# ----- ACL ----- + +begin acl + +chk_mail: + accept control = debug/tag=_1 + +chk_rcpt: + accept control = debug/kill + +chk_data: + accept control = debug/tag=_2/opts=+all + +# End diff --git a/test/log/0574 b/test/log/0574 new file mode 100644 index 000000000..f26f757fc --- /dev/null +++ b/test/log/0574 @@ -0,0 +1,4 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 <= tester@test.ex H=(test.ex) [127.0.0.1] P=esmtp S=sss diff --git a/test/runtest b/test/runtest index fa38ca019..2389efafe 100755 --- a/test/runtest +++ b/test/runtest @@ -1414,6 +1414,10 @@ $munges = { 'mainlog' => 's/^(.* SMTP protocol synchronization error .* next input=.{8}).*$/$1<suppressed>/', 'rejectlog' => 's/^(.* SMTP protocol synchronization error .* next input=.{8}).*$/$1<suppressed>/'}, + 'debuglog_stdout' => + { 'stdout' => 's/^\d\d:\d\d:\d\d* \d+ //; + s/Process \d+ is ready for new message/Process pppp is ready for new message/' + }, }; diff --git a/test/scripts/0000-Basic/0574 b/test/scripts/0000-Basic/0574 new file mode 100644 index 000000000..6784bde56 --- /dev/null +++ b/test/scripts/0000-Basic/0574 @@ -0,0 +1,37 @@ +# debug logging ACL modifier +munge debuglog_stdout +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +client 127.0.0.1 PORT_D +??? 220 +EHLO test.ex +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +MAIL FROM:<tester@test.ex> +??? 250 +RCPT TO:<dest@test.ex> +??? 250 +DATA +??? 354 +Subject: test + +body +. +??? 250 +QUIT +??? 221 +**** +# +killdaemon +# +1 +cat DIR/spool/log/serverdebuglog_1 +# +cat DIR/spool/log/serverdebuglog_2 +# +no_msglog_check diff --git a/test/stderr/0574 b/test/stderr/0574 new file mode 100644 index 000000000..0d94be4e8 --- /dev/null +++ b/test/stderr/0574 @@ -0,0 +1,3 @@ +cat: TESTSUITE/spool/log/serverdebuglog_1: No such file or directory + +******** SERVER ******** diff --git a/test/stdout/0574 b/test/stdout/0574 new file mode 100644 index 000000000..8b960505d --- /dev/null +++ b/test/stdout/0574 @@ -0,0 +1,60 @@ +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO test.ex +??? 250- +<<< 250-myhost.test.ex Hello test.ex [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250 +<<< 250 HELP +>>> MAIL FROM:<tester@test.ex> +??? 250 +<<< 250 OK +>>> RCPT TO:<dest@test.ex> +??? 250 +<<< 250 Accepted +>>> DATA +??? 354 +<<< 354 Enter message, ending with "." on a line by itself +>>> Subject: test +>>> +>>> body +>>> . +??? 250 +<<< 250 OK id=10HmaX-0005vi-00 +>>> QUIT +??? 221 +<<< 221 myhost.test.ex closing connection +End of script +accept: condition test succeeded in ACL "chk_data" +end of ACL "chk_data": ACCEPT +calling local_scan(); timeout=300 +local_scan() returned 0 NULL +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +Writing spool header file +DSN: Write SPOOL :-dsn_envid NULL +DSN: Write SPOOL :-dsn_ret 0 +DSN: Flags :0 +DSN: **** SPOOL_OUT - address: |dest@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0 +Size of headers = sss +LOG: MAIN + <= tester@test.ex H=(test.ex) [127.0.0.1] P=esmtp S=sss +SMTP>> 250 OK id=10HmaX-0005vi-00 +search_tidyup called +Sender: tester@test.ex +Recipients: + dest@test.ex +Process pppp is ready for new message +smtp_setup_msg entered +SMTP<< QUIT +SMTP>> 221 myhost.test.ex closing connection +LOG: smtp_connection MAIN + SMTP connection from (test.ex) [127.0.0.1] closed by QUIT +search_tidyup called |