+ /* Continuation message-id, if a continuation is for that reason,
+ and the next sequence number (MAIL FROM count) for the connection. */
+
+ if (*continue_next_id)
+ rmt_dlv_checked_write(fd, 'Z', '1', big_buffer,
+ sprintf(CS big_buffer, "%.*s %u",
+ MESSAGE_ID_LENGTH, continue_next_id, continue_sequence+1) + 1);
+
+ /* Connection details, only on the first suggested continuation for
+ wait-db ones, but for all continue-more ones (though any after the
+ delivery proc has the info are pointless). */
+
+ if (continue_hostname && continue_fd >= 0)
+ {
+ {
+ uschar * ptr = big_buffer;
+ ptr += sprintf(CS ptr, "%.128s", continue_transport) + 1;
+ ptr += sprintf(CS ptr, "%.128s", continue_hostname) + 1;
+ ptr += sprintf(CS ptr, "%.128s", continue_host_address) + 1;
+ ptr += sprintf(CS ptr, "%u", continue_sequence+1) + 1;
+ rmt_dlv_checked_write(fd, 'Z', '2', big_buffer, ptr - big_buffer);
+ send_fd_over_socket(fd, continue_fd);
+ }
+
+ big_buffer[0] = smtp_peer_options;
+ big_buffer[1] = f.smtp_authenticated ? 1 : 0;
+ rmt_dlv_checked_write(fd, 'Z', '3', big_buffer, 2);
+
+ if (tls_out.active.sock >= 0 || continue_proxy_cipher)
+ rmt_dlv_checked_write(fd, 'Z', '4', big_buffer,
+ sprintf(CS big_buffer, "%.128s", continue_proxy_cipher) + 1);
+
+ if (tls_out.sni)
+ rmt_dlv_checked_write(fd, 'Z',
+#ifdef SUPPORT_DANE
+ tls_out.dane_verified ? '5' : '6',
+#else
+ '6',
+#endif
+ tls_out.sni, Ustrlen(tls_out.sni)+1);
+
+#ifndef DISABLE_ESMTP_LIMITS
+ if (continue_limit_mail || continue_limit_rcpt || continue_limit_rcptdom)
+ rmt_dlv_checked_write(fd, 'Z', '7', big_buffer,
+ sprintf(CS big_buffer, "%u %u %u",
+ continue_limit_mail, continue_limit_rcpt,
+ continue_limit_rcptdom) + 1);
+#endif
+
+#ifdef SUPPORT_SOCKS
+ if (proxy_session)
+ {
+ uschar * ptr = big_buffer;
+ ptr += sprintf(CS ptr, "%.128s", proxy_local_address) + 1;
+ ptr += sprintf(CS ptr, "%u", proxy_local_port) + 1;
+ ptr += sprintf(CS ptr, "%.128s", proxy_external_address) + 1;
+ ptr += sprintf(CS ptr, "%u", proxy_external_port) + 1;
+ rmt_dlv_checked_write(fd, 'Z', '8', big_buffer, ptr - big_buffer);
+ }
+#endif
+ }
+