filter fails to execute.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.4 2004/10/14 11:21:02 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.5 2004/10/14 14:52:45 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
bug fixed in 4.43/37 would have been diagnosed quickly if this had been in
place.
+ 4. Give more explanation in the error message when the command for a transport
+ filter fails to execute.
+
Exim version 4.43
-----------------
-/* $Cambridge: exim/src/src/transport.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transport.c,v 1.2 2004/10/14 14:52:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
}
/* Wait for the writing process to complete. If it ends successfully,
-read the results from its pipe. */
+read the results from its pipe, provided we haven't already had a filter
+process failure. */
DEBUG(D_transport) debug_printf("waiting for writing process\n");
if (write_pid > 0)
{
- if ((rc = child_close(write_pid, 30)) == 0)
+ rc = child_close(write_pid, 30);
+ if (yield)
{
- BOOL ok;
- read(pfd[pipe_read], (void *)&ok, sizeof(BOOL));
- if (!ok)
+ if (rc == 0)
+ {
+ BOOL ok;
+ read(pfd[pipe_read], (void *)&ok, sizeof(BOOL));
+ if (!ok)
+ {
+ read(pfd[pipe_read], (void *)&save_errno, sizeof(int));
+ read(pfd[pipe_read], (void *)&(addr->more_errno), sizeof(int));
+ yield = FALSE;
+ }
+ }
+ else
{
- read(pfd[pipe_read], (void *)&save_errno, sizeof(int));
- read(pfd[pipe_read], (void *)&(addr->more_errno), sizeof(int));
yield = FALSE;
+ save_errno = ERRNO_FILTER_FAIL;
+ addr->more_errno = rc;
+ DEBUG(D_transport) debug_printf("writing process returned %d\n", rc);
}
- }
- else if (yield)
- {
- yield = FALSE;
- save_errno = ERRNO_FILTER_FAIL;
- addr->more_errno = rc;
- DEBUG(D_transport) debug_printf("writing process returned %d\n", rc);
- }
+ }
}
close(pfd[pipe_read]);
-/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.2 2004/10/11 09:49:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.3 2004/10/14 14:52:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
from child_close() is in more_errno. */
else if (errno == ERRNO_FILTER_FAIL)
- addr->message = string_sprintf("filter process failure %d while writing "
- "to %s", addr->more_errno, dataname);
+ {
+ yield = PANIC;
+ addr->message = string_sprintf("transport filter process failed (%d) "
+ "while writing to %s%s", addr->more_errno, dataname,
+ (addr->more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
+ }
/* Handle failure to expand header changes */
-/* $Cambridge: exim/src/src/transports/lmtp.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/lmtp.c,v 1.2 2004/10/14 14:52:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (*errno_value == ERRNO_FILTER_FAIL)
{
- *message = string_sprintf("transport filter process failed (%d)", more_errno);
+ *message = string_sprintf("transport filter process failed (%d)%s",
+ more_errno,
+ (more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
return FALSE;
}
-/* $Cambridge: exim/src/src/transports/pipe.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/pipe.c,v 1.2 2004/10/14 14:52:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
}
else
{
- addr->transport_return = PANIC;
+ addr->transport_return = PANIC;
addr->basic_errno = errno;
if (errno == ERRNO_CHHEADER_FAIL)
addr->message =
string_sprintf("Failed to expand headers_add or headers_remove: %s",
expand_string_message);
else if (errno == ERRNO_FILTER_FAIL)
- addr->message = string_sprintf("Filter process failure");
+ addr->message = string_sprintf("Transport filter process failed (%d)%s",
+ addr->more_errno,
+ (addr->more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
else if (errno == ERRNO_WRITEINCOMPLETE)
addr->message = string_sprintf("Failed repeatedly to write data");
else
-/* $Cambridge: exim/src/src/transports/smtp.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.c,v 1.2 2004/10/14 14:52:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (*errno_value == ERRNO_FILTER_FAIL)
{
- *message = US string_sprintf("transport filter process failed (%d)",
- more_errno);
+ *message = US string_sprintf("transport filter process failed (%d)%s",
+ more_errno,
+ (more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
return FALSE;
}