Pipe transport: fix log_defer_output option. Bug 840
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 25 Oct 2015 22:42:22 +0000 (22:42 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 25 Oct 2015 22:42:22 +0000 (22:42 +0000)
doc/doc-txt/ChangeLog
src/src/deliver.c
test/confs/0612 [new file with mode: 0644]
test/log/0612 [new file with mode: 0644]
test/scripts/0000-Basic/0612 [new file with mode: 0644]

index 4fb3664..abdc5b7 100644 (file)
@@ -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
 -----------------
index 87f9cfb..3dfa842 100644 (file)
@@ -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 (file)
index 0000000..7730457
--- /dev/null
@@ -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 (file)
index 0000000..447c0f8
--- /dev/null
@@ -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 <a@myhost.test.ex>: 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 (file)
index 0000000..27aa56f
--- /dev/null
@@ -0,0 +1,6 @@
+# log_defer_output on pipe transport
+#
+exim a
+****
+sleep 1
+no_msglog_check