+ /* Create the "address" for the autoreply. This is used only for logging,
+ as the actual recipients are extraced from the To: line by -t. We use the
+ same logic here to extract the working addresses (there may be more than
+ one). */
+
+ 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_cat(log_addr, &size, &ptr,
+ (log_addr == NULL)? US">" : US",", 1);
+ log_addr = string_cat(log_addr, &size, &ptr, recipient,
+ Ustrlen(recipient));
+ }
+
+ /* Move on past this address */
+
+ tt = ss + (*ss? 1:0);
+ while (isspace(*tt)) tt++;
+ }
+
+ if (log_addr == NULL) log_addr = string_sprintf("invalid-to-line");
+ else log_addr[ptr] = 0;