/* Time on queue and actual time taken to deliver */
if ((log_extra_selector & LX_queue_time) != 0)
- {
s = string_append(s, &size, &ptr, 2, US" QT=",
- readconf_printtime(time(NULL) - received_time));
- }
+ readconf_printtime( (int) ((long)time(NULL) - (long)received_time)) );
if ((log_extra_selector & LX_deliver_time) != 0)
- {
s = string_append(s, &size, &ptr, 2, US" DT=",
readconf_printtime(addr->more_errno));
- }
/* string_cat() always leaves room for the terminator. Release the
store we used to build the line after writing it. */
DEBUG(D_deliver) debug_printf("sending error message to: %s\n", sender_address);
/* build unique id for MIME boundary */
- snprintf(boundaryStr, 63, "%l-eximdsn-%d", (long) time(NULL), rand());
+ snprintf(boundaryStr, sizeof(boundaryStr)-1, TIME_T_FMT "-eximdsn-%d",
+ time(NULL), rand());
DEBUG(D_deliver) debug_printf("DSN: MIME boundary: %s\n", boundaryStr);
if (errors_reply_to != NULL) fprintf(f,"Reply-To: %s\n", errors_reply_to);
BOOL to_sender = strcmpic(sender_address, bounce_recipient) == 0;
int max = (bounce_return_size_limit/DELIVER_IN_BUFFER_SIZE + 1) *
DELIVER_IN_BUFFER_SIZE;
+#ifdef EXPERIMENTAL_DSN
+ uschar boundaryStr[64];
+ uschar *dsnlimitmsg;
+ uschar *dsnnotifyhdr;
+ int topt;
+#endif
DEBUG(D_deliver)
debug_printf("sending error message to: %s\n", bounce_recipient);
#ifdef EXPERIMENTAL_DSN
/* generate boundary string and output MIME-Headers */
- uschar boundaryStr[64];
snprintf(boundaryStr, 63, "%l-eximdsn-%d", (long) time(NULL), rand());
fprintf(f,"Content-Type: multipart/report; report-type=delivery-status; boundary=%s\n", boundaryStr);
fprintf(f,"MIME-Version: 1.0\n");
fprintf(f,"\n--%s\n", boundaryStr);
- uschar *dsnlimitmsg = US"X-Exim-DSN-Information: Due to administrative limits only headers are returned";
- uschar *dsnnotifyhdr = NULL;
- int topt = topt_add_return_path;
+ dsnlimitmsg = US"X-Exim-DSN-Information: Due to administrative limits only headers are returned";
+ dsnnotifyhdr = NULL;
+ topt = topt_add_return_path;
+
/* RET=HDRS? top priority */
if (dsn_ret == dsn_ret_hdrs)
topt |= topt_no_body;
if ((log_extra_selector & LX_queue_time_overall) != 0)
log_write(0, LOG_MAIN, "Completed QT=%s",
- readconf_printtime(time(NULL) - received_time));
+ readconf_printtime( (int) ((long)time(NULL) - (long)received_time)) );
else
log_write(0, LOG_MAIN, "Completed");
uschar *wmf_text;
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
+#ifdef EXPERIMENTAL_DSN
+ uschar boundaryStr[64];
+#endif
if (warn_message_file != NULL)
{
#ifdef EXPERIMENTAL_DSN
/* generated boundary string and output MIME-Headers */
- uschar boundaryStr[64];
snprintf(boundaryStr, 63, "%l-eximdsn-%d", (long) time(NULL), rand());
fprintf(f,"Content-Type: multipart/report; report-type=delivery-status; boundary=%s\n", boundaryStr);
fprintf(f,"MIME-Version: 1.0\n");