X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/447d236c3a15a89d18789de568ae974677f7aaf4..b1c749bb7f147e7f9215fe6067c848cf02938b92:/src/src/deliver.c diff --git a/src/src/deliver.c b/src/src/deliver.c index a7b367d80..2568c9770 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/deliver.c,v 1.14 2005/04/28 13:06:32 ph10 Exp $ */ +/* $Cambridge: exim/src/src/deliver.c,v 1.18 2005/06/16 14:10:13 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -878,6 +878,11 @@ if (result == OK) if ((log_extra_selector & LX_sender_on_delivery) != 0) s = string_append(s, &size, &ptr, 3, US" F=<", sender_address, US">"); + #ifdef EXPERIMENTAL_SRS + if(addr->p.srs_sender) + s = string_append(s, &size, &ptr, 3, US" SRS=<", addr->p.srs_sender, US">"); + #endif + /* You might think that the return path must always be set for a successful delivery; indeed, I did for some time, until this statement crashed. The case when it is not set is for a delivery to /dev/null which is optimised by not @@ -1537,8 +1542,14 @@ transport_instance *tp = addr->transport; /* Set up the return path from the errors or sender address. If the transport has its own return path setting, expand it and replace the existing value. */ -return_path = (addr->p.errors_address != NULL)? - addr->p.errors_address : sender_address; +if(addr->p.errors_address != NULL) + return_path = addr->p.errors_address; +#ifdef EXPERIMENTAL_SRS +else if(addr->p.srs_sender != NULL) + return_path = addr->p.srs_sender; +#endif +else + return_path = sender_address; if (tp->return_path != NULL) { @@ -3528,8 +3539,14 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++) /* Compute the return path, expanding a new one if required. The old one must be set first, as it might be referred to in the expansion. */ - return_path = (addr->p.errors_address != NULL)? - addr->p.errors_address : sender_address; + if(addr->p.errors_address != NULL) + return_path = addr->p.errors_address; +#ifdef EXPERIMENTAL_SRS + else if(addr->p.srs_sender != NULL) + return_path = addr->p.srs_sender; +#endif + else + return_path = sender_address; if (tp->return_path != NULL) { @@ -4465,11 +4482,8 @@ if ((rc = spool_read_header(spoolname, TRUE, TRUE)) != spool_read_OK) sprintf(CS big_buffer, "%s/input/%s/%s", spool_directory, message_subdir, spoolname); if (Ustat(big_buffer, &statbuf) == 0) - { - int size = statbuf.st_size; /* Because might be a long */ - log_write(0, LOG_MAIN, "Format error in spool file %s: size=%d", - spoolname, size); - } + log_write(0, LOG_MAIN, "Format error in spool file %s: " + "size=" OFF_T_FMT, spoolname, statbuf.st_size); else log_write(0, LOG_MAIN, "Format error in spool file %s", spoolname); } else @@ -4587,17 +4601,22 @@ if (deliver_freeze) log_write(0, LOG_MAIN, "Unfrozen by errmsg timer"); } - /* If there's no auto thaw, or we haven't reached the auto thaw time yet, and - this delivery is not forced by an admin user, do not attempt delivery of this - message. Note that forced is set for continuing messages down the same - channel, in order to skip load checking and ignore hold domains, but we - don't want unfreezing in that case. */ + /* If this is a bounce message, or there's no auto thaw, or we haven't + reached the auto thaw time yet, and this delivery is not forced by an admin + user, do not attempt delivery of this message. Note that forced is set for + continuing messages down the same channel, in order to skip load checking and + ignore hold domains, but we don't want unfreezing in that case. */ else { - if ((auto_thaw <= 0 || now <= deliver_frozen_at + auto_thaw) && - (!forced || !deliver_force_thaw || !admin_user || - continue_hostname != NULL)) + if ((sender_address[0] == 0 || + auto_thaw <= 0 || + now <= deliver_frozen_at + auto_thaw + ) + && + (!forced || !deliver_force_thaw || !admin_user || + continue_hostname != NULL + )) { close(deliver_datafile); deliver_datafile = -1; @@ -6326,8 +6345,8 @@ wording. */ if (emf_text != NULL) fprintf(f, "%s", CS emf_text); else { fprintf(f, -"------ The body of the message is %d characters long; only the first\n" -"------ %d or so are included here.\n", (int)statbuf.st_size, max); +"------ The body of the message is " OFF_T_FMT " characters long; only the first\n" +"------ %d or so are included here.\n", statbuf.st_size, max); } } }