wip
[users/heiko/exim.git] / src / src / transports / autoreply.c
index e75349ed9b7eb9ca928d3226f548bb16b94ea6bc..ce7f7e1e2a42e2d628c4541a990b796b7fb49b67 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -476,6 +477,7 @@ if (oncelog && *oncelog && to)
     uschar * dirname = string_copy(oncelog);
     uschar * s;
 
+debug_printf("%s %d: oncelog '%s'\n", __FUNCTION__, __LINE__, oncelog);
     if ((s = Ustrrchr(dirname, '/'))) *s = '\0';
     EXIM_DBOPEN(oncelog, dirname, O_RDWR|O_CREAT, ob->mode, &dbm_file);
     if (!dbm_file)
@@ -567,12 +569,10 @@ if (file)
 
 /* Make a subprocess to send the message */
 
-pid = child_open_exim(&fd);
-
-/* Creation of child failed; defer this delivery. */
-
-if (pid < 0)
+if ((pid = child_open_exim(&fd, US"autoreply")) < 0)
   {
+  /* Creation of child failed; defer this delivery. */
+
   addr->transport_return = DEFER;
   addr->basic_errno = errno;
   addr->message = string_sprintf("Failed to create child process to send "