X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/f1e894f37fb99398f7447220925a915bd031491a..b2f5a03200c914f601bc9d28c6e069316a3b20eb:/src/src/deliver.c diff --git a/src/src/deliver.c b/src/src/deliver.c index 41a43c80d..c166d2601 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.22 2005/08/02 11:22:24 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -5856,6 +5856,15 @@ deliveries are done first, then remote ones. If ever the problems of how to handle fallback transports are figured out, this section can be put into a loop for handling fallbacks, though the uid switching will have to be revised. */ +/* Precompile a regex that is used to recognize a parameter in response +to an LHLO command, if is isn't already compiled. This may be used on both +local and remote LMTP deliveries. */ + +if (regex_IGNOREQUOTA == NULL) regex_IGNOREQUOTA = + regex_must_compile(US"\\n250[\\s\\-]IGNOREQUOTA(\\s|\\n|$)", FALSE, TRUE); + +/* Handle local deliveries */ + if (addr_local != NULL) { DEBUG(D_deliver|D_transport) @@ -5952,11 +5961,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)?