-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.279 2005/12/15 18:09:55 jetmore Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.280 2005/12/19 12:25:21 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
JJ/02 exipick: Added support for new ACL variable spool format introduced
in 4.61-PH/06
+PH/10 Fixed another bug related to PH/04 above: if an incoming message had a
+ syntactically invalid From: or Reply-to: line, and a filter used this to
+ generate an autoreply, and therefore failed to obtain an address for the
+ autoreply, Exim could try to deliver to a non-existent relative file
+ name, causing unrelated and misleading errors. What now happens is that
+ it logs this as a hard delivery error, but does not attempt to create a
+ bounce message.
+
Exim version 4.60
-----------------
-/* $Cambridge: exim/src/src/deliver.c,v 1.24 2005/12/12 11:41:50 ph10 Exp $ */
+/* $Cambridge: exim/src/src/deliver.c,v 1.25 2005/12/19 12:25:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (testflag(addr, af_pfr))
{
- int offset = testflag(addr->parent, af_homonym)? 3:0;
+ /* If an autoreply in a filter could not generate a syntactically valid
+ address, give up forthwith. Set af_ignore_error so that we don't try to
+ generate a bounce. */
+
+ if (testflag(addr, af_bad_reply))
+ {
+ addr->basic_errno = ERRNO_BADADDRESS2;
+ addr->local_part = addr->address;
+ addr->message =
+ US"filter autoreply generated syntactically invalid recipient";
+ setflag(addr, af_ignore_error);
+ (void)post_process_one(addr, FAIL, LOG_MAIN, DTYPE_ROUTER, 0);
+ continue; /* with the next new address */
+ }
/* If two different users specify delivery to the same pipe or file or
autoreply, there should be two different deliveries, so build a unique
duplicate testing and recording delivery, and also for retrying. */
addr->unique =
- string_sprintf("%s:%s", addr->address, addr->parent->unique + offset);
+ string_sprintf("%s:%s", addr->address, addr->parent->unique +
+ (testflag(addr->parent, af_homonym)? 3:0));
addr->address_retry_key = addr->domain_retry_key =
string_sprintf("T:%s", addr->unique);
-/* $Cambridge: exim/src/src/filter.c,v 1.7 2005/11/11 10:02:04 ph10 Exp $ */
+/* $Cambridge: exim/src/src/filter.c,v 1.8 2005/12/19 12:25:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
uschar *to = commands->args[mailarg_index_to].u;
int size = 0;
int ptr = 0;
+ int badflag = 0;
if (to == NULL) to = expand_string(US"$reply_address");
while (isspace(*to)) to++;
while (isspace(*tt)) tt++;
}
- if (log_addr == NULL) log_addr = string_sprintf("invalid-to-line");
- else log_addr[ptr] = 0;
+ if (log_addr == NULL)
+ {
+ log_addr = string_sprintf(">**bad-reply**");
+ badflag = af_bad_reply;
+ }
+ else log_addr[ptr] = 0;
addr = deliver_make_addr(log_addr, FALSE);
- setflag(addr, af_pfr);
+ setflag(addr, (af_pfr|badflag));
if (commands->noerror) setflag(addr, af_ignore_error);
addr->next = *generated;
*generated = addr;
-/* $Cambridge: exim/src/src/structs.h,v 1.7 2005/09/12 15:09:55 ph10 Exp $ */
+/* $Cambridge: exim/src/src/structs.h,v 1.8 2005/12/19 12:25:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
#define af_include_affixes 0x00800000 /* delivered with affixes in RCPT */
#define af_cert_verified 0x01000000 /* delivered with verified TLS cert */
#define af_pass_message 0x02000000 /* pass message in bounces */
+#define af_bad_reply 0x04000000 /* filter could not generate autoreply */
/* These flags must be propagated when a child is created */