git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
461f486
)
Give more explanation in the error message when the command for a transport
author
Philip Hazel
<ph10@hermes.cam.ac.uk>
Thu, 14 Oct 2004 14:52:45 +0000
(14:52 +0000)
committer
Philip Hazel
<ph10@hermes.cam.ac.uk>
Thu, 14 Oct 2004 14:52:45 +0000
(14:52 +0000)
filter fails to execute.
doc/doc-txt/ChangeLog
patch
|
blob
|
history
src/src/transport.c
patch
|
blob
|
history
src/src/transports/appendfile.c
patch
|
blob
|
history
src/src/transports/lmtp.c
patch
|
blob
|
history
src/src/transports/pipe.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
diff --git
a/doc/doc-txt/ChangeLog
b/doc/doc-txt/ChangeLog
index 6e1d523b46b3f0d438c1e419b7dc186abbae166e..f57ab6c3fba51e1ccc6733f74e1d045ee091fb7b 100644
(file)
--- a/
doc/doc-txt/ChangeLog
+++ b/
doc/doc-txt/ChangeLog
@@
-1,4
+1,4
@@
-$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
-------------------------------------------
Change log file for Exim from version 4.21
-------------------------------------------
@@
-16,6
+16,9
@@
Exim version 4.44
bug fixed in 4.43/37 would have been diagnosed quickly if this had been in
place.
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
-----------------
Exim version 4.43
-----------------
diff --git
a/src/src/transport.c
b/src/src/transport.c
index 855bedd9116d81feab0c93f0a31e429fa41944f0..8b68417835a9951aa64084cec360421f7b7a2536 100644
(file)
--- a/
src/src/transport.c
+++ b/
src/src/transport.c
@@
-1,4
+1,4
@@
-/* $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 *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-1095,29
+1095,34
@@
if (filter_pid > 0 && (rc = child_close(filter_pid, 30)) != 0 && yield)
}
/* Wait for the writing process to complete. If it ends successfully,
}
/* 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)
{
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;
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]);
}
close(pfd[pipe_read]);
diff --git
a/src/src/transports/appendfile.c
b/src/src/transports/appendfile.c
index bdda9047de15518755f67a961eb5de3a979092df..8cac73c30f39e5bf2adc9279ed06d07691248ca5 100644
(file)
--- a/
src/src/transports/appendfile.c
+++ b/
src/src/transports/appendfile.c
@@
-1,4
+1,4
@@
-/* $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 *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-2858,8
+2858,12
@@
if (yield != OK)
from child_close() is in more_errno. */
else if (errno == ERRNO_FILTER_FAIL)
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 */
/* Handle failure to expand header changes */
diff --git
a/src/src/transports/lmtp.c
b/src/src/transports/lmtp.c
index 871f724c061bc3e9b8b15c7676c563055e183ce1..17b0b8253553bb37a512922415ee00c4d7889527 100644
(file)
--- a/
src/src/transports/lmtp.c
+++ b/
src/src/transports/lmtp.c
@@
-1,4
+1,4
@@
-/* $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 *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-141,7
+141,9
@@
end the DATA. */
if (*errno_value == ERRNO_FILTER_FAIL)
{
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;
}
return FALSE;
}
diff --git
a/src/src/transports/pipe.c
b/src/src/transports/pipe.c
index f2fe47112d34d8008956b74d3263d65cff7e4e26..d159186bab647e8ea18b9639f9d10ca76955d5c9 100644
(file)
--- a/
src/src/transports/pipe.c
+++ b/
src/src/transports/pipe.c
@@
-1,4
+1,4
@@
-/* $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 *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-800,14
+800,16
@@
if (!written_ok)
}
else
{
}
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->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
else if (errno == ERRNO_WRITEINCOMPLETE)
addr->message = string_sprintf("Failed repeatedly to write data");
else
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 71fca3a103b4d6212c8c00a6118d5a6da71153f7..1a7f84271325a7e92e10c1c5e41537f3bd6e2fee 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-1,4
+1,4
@@
-/* $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 *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-389,8
+389,9
@@
end the DATA. */
if (*errno_value == ERRNO_FILTER_FAIL)
{
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;
}
return FALSE;
}