From ec0eb1a387b88e6ddd3f1f9ba6ffad6422b7298a Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 25 Oct 2015 22:42:22 +0000 Subject: [PATCH] Pipe transport: fix log_defer_output option. Bug 840 --- doc/doc-txt/ChangeLog | 2 ++ src/src/deliver.c | 2 +- test/confs/0612 | 44 ++++++++++++++++++++++++++++++++++++ test/log/0612 | 3 +++ test/scripts/0000-Basic/0612 | 6 +++++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 test/confs/0612 create mode 100644 test/log/0612 create mode 100644 test/scripts/0000-Basic/0612 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 4fb36643e..abdc5b7cb 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -58,6 +58,8 @@ JH/08 Bug 1586: exiqgrep now refuses to run if there are unexpected arguments. JH/09 Bug 1700: ignore space & tab embedded in base64 during decode. +JH/10 Bug 840: fix log_defer_output option of pipe transport + Exim version 4.86 ----------------- diff --git a/src/src/deliver.c b/src/src/deliver.c index 87f9cfb06..3dfa84261 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1929,7 +1929,7 @@ address. This feature is not available for shadow transports. */ if ( !shadowing && ( tp->return_output || tp->return_fail_output - || tp->log_output || tp->log_fail_output + || tp->log_output || tp->log_fail_output || tp->log_defer_output ) ) { uschar *error; diff --git a/test/confs/0612 b/test/confs/0612 new file mode 100644 index 000000000..773045752 --- /dev/null +++ b/test/confs/0612 @@ -0,0 +1,44 @@ +# Exim test configuration 0612 +# log_defer_output on pipe transport + +exim_path = EXIM_PATH +host_lookup_order = bydns +primary_hostname = myhost.test.ex +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + +# ----- Main settings ----- + +log_selector = +received_recipients + +#acl_smtp_rcpt = accept + +# ----- Routers ----- + +begin routers + +client: + driver = accept + transport = pipe + +# ----- Transports ----- + +begin transports + +pipe: + driver = pipe + temp_errors = * + command = perl -e "print 'Hi from pipe'; exit 5;" + log_defer_output = true + +# ----- Retry ----- + + +begin retry + +* * F,1h,10m + + +# End diff --git a/test/log/0612 b/test/log/0612 new file mode 100644 index 000000000..447c0f8ae --- /dev/null +++ b/test/log/0612 @@ -0,0 +1,3 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for a +1999-03-02 09:44:33 10HmaX-0005vi-00 : pipe transport output: Hi from pipe +1999-03-02 09:44:33 10HmaX-0005vi-00 == a@myhost.test.ex R=client T=pipe defer (0): Child process of pipe transport returned 5 from command: /bin/perl diff --git a/test/scripts/0000-Basic/0612 b/test/scripts/0000-Basic/0612 new file mode 100644 index 000000000..27aa56feb --- /dev/null +++ b/test/scripts/0000-Basic/0612 @@ -0,0 +1,6 @@ +# log_defer_output on pipe transport +# +exim a +**** +sleep 1 +no_msglog_check -- 2.25.1