JH/30 The (EXPERIMENTAL_DMARC) variable $dmarc_ar_header is withdrawn, being
replaced by the ${authresults } expansion.
+JH/31 Bug 2257: Fix pipe transport to not use a socket-only syscall.
+
Exim version 4.90
-----------------
#define topt_use_bdat 0x100 /* prepend chunks with RFC3030 BDAT header */
#define topt_output_string 0x200 /* create string rather than write to fd */
#define topt_continuation 0x400 /* do not reset buffer */
+#define topt_not_socket 0x800 /* cannot do socket-only syscalls */
/* Options for smtp_write_command */
tls_out.active == fd ? tls_write(FALSE, block, len, more) :
#endif
#ifdef MSG_MORE
- more ? send(fd, block, len, MSG_MORE) :
+ more && !(tctx->options & topt_not_socket)
+ ? send(fd, block, len, MSG_MORE) :
#endif
write(fd, block, len);
save_errno = errno;
int used;
off_t size;
struct stat statbuf;
-transport_ctx tctx = {{0}};
-
-tctx.u.fd = to_fd;
+transport_ctx tctx = { .u={.fd = to_fd}, .options = topt_not_socket };
/* If the current mailbox size is zero, write a header block */
if (yield == OK)
{
transport_ctx tctx = {
- {fd},
- tblock,
- addr,
- ob->check_string,
- ob->escape_string,
- ob->options
+ .u = {.fd=fd},
+ .tblock = tblock,
+ .addr = addr,
+ .check_string = ob->check_string,
+ .escape_string = ob->escape_string,
+ .options = ob->options | topt_not_socket
};
if (!transport_write_message(&tctx, 0))
yield = DEFER;
:
US"------ This is a copy of the message, including all the headers.\n";
transport_ctx tctx = {
- {fileno(f)},
- tblock,
- addr,
- NULL, NULL,
- (tblock->body_only ? topt_no_headers : 0) |
- (tblock->headers_only ? topt_no_body : 0) |
- (tblock->return_path_add ? topt_add_return_path : 0) |
- (tblock->delivery_date_add ? topt_add_delivery_date : 0) |
- (tblock->envelope_to_add ? topt_add_envelope_to : 0)
+ .u = {.fd = fileno(f)},
+ .tblock = tblock,
+ .addr = addr,
+ .check_string = NULL,
+ .escape_string = NULL,
+ .options = (tblock->body_only ? topt_no_headers : 0)
+ | (tblock->headers_only ? topt_no_body : 0)
+ | (tblock->return_path_add ? topt_add_return_path : 0)
+ | (tblock->delivery_date_add ? topt_add_delivery_date : 0)
+ | (tblock->envelope_to_add ? topt_add_envelope_to : 0)
+ | topt_not_socket
};
if (bounce_return_size_limit > 0 && !tblock->headers_only)
uschar *cmd, *ss;
uschar *eol = ob->use_crlf ? US"\r\n" : US"\n";
transport_ctx tctx = {
- {0},
- tblock,
- addr,
- ob->check_string,
- ob->escape_string,
- ob->options /* set at initialization time */
+ .tblock = tblock,
+ .addr = addr,
+ .check_string = ob->check_string,
+ .escape_string = ob->escape_string,
+ ob->options | topt_not_socket /* set at initialization time */
};
DEBUG(D_transport) debug_printf("%s transport entered\n", tblock->name);