summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-txt/ChangeLog9
-rw-r--r--src/src/deliver.c24
-rw-r--r--src/src/exim.c13
-rw-r--r--src/src/log.c6
4 files changed, 41 insertions, 11 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index c1f8c197e..9299949a4 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.176 2005/06/28 08:49:38 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.177 2005/06/28 10:23:35 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -225,6 +225,13 @@ TK/11 Domainkeys: Change the logic how the "testing" policy flag is retrieved
TK/12 Cleared some compiler warnings related to SPF, SRS and DK code.
+PH/32 In mua_wrapper mode, if an smtp transport configuration error (such as
+ the use of a port name that isn't defined in /etc/services) occurred, the
+ message was deferred as in a normal delivery, and thus remained on the
+ spool, instead of being failed because of the mua_wrapper setting. This
+ is now fixed, and I tidied up some of the mua_wrapper messages at the
+ same time.
+
Exim version 4.51
-----------------
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 41a43c80d..23875d959 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/deliver.c,v 1.20 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/deliver.c,v 1.21 2005/06/28 10:23:35 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -5952,11 +5952,29 @@ set_process_info("tidying up after delivering %s", message_id);
signal(SIGTERM, SIG_IGN);
/* When we are acting as an MUA wrapper, the smtp transport will either have
-succeeded for all addresses, or failed them all. We do not ever want to retry,
-nor do we want to send a bounce message. */
+succeeded for all addresses, or failed them all in normal cases. However, there
+are some setup situations (e.g. when a named port does not exist) that cause an
+immediate exit with deferral of all addresses. Convert those into failures. We
+do not ever want to retry, nor do we want to send a bounce message. */
if (mua_wrapper)
{
+ if (addr_defer != NULL)
+ {
+ address_item *addr, *nextaddr;
+ for (addr = addr_defer; addr != NULL; addr = nextaddr)
+ {
+ log_write(0, LOG_MAIN, "** %s mua_wrapper forced failure for deferred "
+ "delivery", addr->address);
+ nextaddr = addr->next;
+ addr->next = addr_failed;
+ addr_failed = addr;
+ }
+ addr_defer = NULL;
+ }
+
+ /* Now all should either have succeeded or failed. */
+
if (addr_failed == NULL) final_yield = DELIVER_MUA_SUCCEEDED; else
{
uschar *s = (addr_failed->user_message != NULL)?
diff --git a/src/src/exim.c b/src/src/exim.c
index 4c8366951..5cc0cb47c 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.c,v 1.21 2005/06/27 14:29:04 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.22 2005/06/28 10:23:35 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -3939,12 +3939,17 @@ DEBUG(D_receive) debug_printf("originator: uid=%d gid=%d login=%s name=%s\n",
/* Run in daemon and/or queue-running mode. The function daemon_go() never
returns. We leave this till here so that the originator_ fields are available
-for incoming messages via the daemon. */
+for incoming messages via the daemon. The daemon cannot be run in mua_wrapper
+mode. */
if (daemon_listen || queue_interval > 0)
{
- if (mua_wrapper) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Daemon cannot be "
- "run when mua_wrapper is set");
+ if (mua_wrapper)
+ {
+ fprintf(stderr, "Daemon cannot be run when mua_wrapper is set\n");
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Daemon cannot be run when "
+ "mua_wrapper is set");
+ }
daemon_go();
}
diff --git a/src/src/log.c b/src/src/log.c
index a014befb7..1427bd061 100644
--- a/src/src/log.c
+++ b/src/src/log.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/log.c,v 1.5 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/log.c,v 1.6 2005/06/28 10:23:35 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -997,11 +997,11 @@ if ((flags & LOG_PROCESS) != 0)
/* Handle the panic log, which is not kept open like the others. If it fails to
open, there will be a recursive call to log_write(). We detect this above and
attempt to write to the system log as a last-ditch try at telling somebody. In
-all cases, try to write to log_stderr. */
+all cases except mua_wrapper, try to write to log_stderr. */
if ((flags & LOG_PANIC) != 0)
{
- if (log_stderr != NULL && log_stderr != debug_file)
+ if (log_stderr != NULL && log_stderr != debug_file && !mua_wrapper)
fprintf(log_stderr, "%s", CS log_buffer);
if ((logging_mode & LOG_MODE_SYSLOG) != 0)