{
FILE *f = fdopen(fd, "wb");
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
- int topt = topt_add_return_path | topt_no_body;
uschar * bound;
+ transport_ctx tctx = {0};
DEBUG(D_deliver)
debug_printf("sending error message to: %s\n", sender_address);
return_path = sender_address; /* In case not previously set */
/* Write the original email out */
- transport_write_message(NULL, fileno(f), topt, 0, NULL, NULL, NULL, NULL, NULL, 0);
+
+ tctx.options = topt_add_return_path | topt_no_body;
+ transport_write_message(fileno(f), &tctx, 0);
fflush(f);
fprintf(f,"\n--%s--\n", bound);
fflush(f);
transport_filter_argv = NULL; /* Just in case */
return_path = sender_address; /* In case not previously set */
- transport_write_message(NULL, fileno(f), topt,
- 0, dsnnotifyhdr, NULL, NULL, NULL, NULL, 0);
+ { /* Dummy transport for headers add */
+ transport_ctx tctx = {0};
+ transport_instance tb = {0};
+
+ tctx.tblock = &tb;
+ tctx.options = topt;
+ tb.add_headers = dsnnotifyhdr;
+
+ transport_write_message(fileno(f), &tctx, 0);
+ }
fflush(f);
/* we never add the final text. close the file */
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
uschar * bound;
- int topt;
+ transport_ctx tctx = {0};
if (warn_message_file)
if (!(wmf = Ufopen(warn_message_file, "rb")))
fflush(f);
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
- topt = topt_add_return_path | topt_no_body;
+ tctx.options = topt_add_return_path | topt_no_body;
transport_filter_argv = NULL; /* Just in case */
return_path = sender_address; /* In case not previously set */
+
/* Write the original email out */
- transport_write_message(NULL, fileno(f), topt, 0, NULL, NULL, NULL, NULL, NULL, 0);
+ transport_write_message(fileno(f), &tctx, 0);
fflush(f);
fprintf(f,"\n--%s--\n", bound);