+ tt = to;
+ while (*tt != 0)
+ {
+ uschar *ss = parse_find_address_end(tt, FALSE);
+ uschar *recipient, *errmess;
+ int start, end, domain;
+ int temp = *ss;
+
+ *ss = 0;
+ recipient = parse_extract_address(tt, &errmess, &start, &end, &domain,
+ FALSE);
+ *ss = temp;
+
+ /* Ignore empty addresses and errors; an error will occur later if
+ there's something really bad. */
+
+ if (recipient != NULL)
+ {
+ log_addr = string_catn(log_addr, &size, &ptr,
+ log_addr ? US"," : US">", 1);
+ log_addr = string_cat(log_addr, &size, &ptr, recipient);
+ }
+
+ /* Check size */
+
+ if (ptr > 256)
+ {
+ log_addr = string_catn(log_addr, &size, &ptr, US", ...", 5);
+ break;
+ }
+
+ /* Move on past this address */
+
+ tt = ss + (*ss? 1:0);
+ while (isspace(*tt)) tt++;
+ }
+
+ 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|badflag));