X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/f6c332bd03c89f108c7fe531156cb18d7888ba35..184e88237dea64ce48076cdd0184612d057cbafd:/src/src/deliver.c diff --git a/src/src/deliver.c b/src/src/deliver.c index 81df0e083..fb853aa5d 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1,10 +1,10 @@ -/* $Cambridge: exim/src/src/deliver.c,v 1.37 2006/10/30 16:41:04 ph10 Exp $ */ +/* $Cambridge: exim/src/src/deliver.c,v 1.40 2007/01/08 10:50:18 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2007 */ /* See the file NOTICE for conditions of use and distribution. */ /* The main code for delivering a message. */ @@ -4941,6 +4941,9 @@ else if (system_filter != NULL && process_recipients != RECIP_FAIL_TIMEOUT) while (p != NULL) { + if (parent->child_count == SHRT_MAX) + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "system filter generated more " + "than %d delivery addresses", SHRT_MAX); parent->child_count++; p->parent = parent; @@ -5452,8 +5455,10 @@ while (addr_new != NULL) /* Loop until all addresses dealt with */ } /* Get the routing retry status, saving the two retry keys (with and - without the local part) for subsequent use. Ignore retry records that - are too old. */ + without the local part) for subsequent use. If there is no retry record for + the standard address routing retry key, we look for the same key with the + sender attached, because this form is used by the smtp transport after a + 4xx response to RCPT when address_retry_include_sender is true. */ addr->domain_retry_key = string_sprintf("R:%s", addr->domain); addr->address_retry_key = string_sprintf("R:%s@%s", addr->local_part, @@ -5466,12 +5471,22 @@ while (addr_new != NULL) /* Loop until all addresses dealt with */ domain_retry_record = dbfn_read(dbm_file, addr->domain_retry_key); if (domain_retry_record != NULL && now - domain_retry_record->time_stamp > retry_data_expire) - domain_retry_record = NULL; + domain_retry_record = NULL; /* Ignore if too old */ address_retry_record = dbfn_read(dbm_file, addr->address_retry_key); if (address_retry_record != NULL && now - address_retry_record->time_stamp > retry_data_expire) - address_retry_record = NULL; + address_retry_record = NULL; /* Ignore if too old */ + + if (address_retry_record == NULL) + { + uschar * altkey = string_sprintf("%s:<%s>", addr->address_retry_key, + sender_address); + address_retry_record = dbfn_read(dbm_file, altkey); + if (address_retry_record != NULL && + now - address_retry_record->time_stamp > retry_data_expire) + address_retry_record = NULL; /* Ignore if too old */ + } } DEBUG(D_deliver|D_retry)