static BOOL rcpt_smtp_response_same;
static BOOL rcpt_in_progress;
static int nonmail_command_count;
+static int off = 0;
+static int on = 1;
static BOOL smtp_exit_function_called = 0;
#ifdef SUPPORT_I18N
static BOOL smtputf8_advertised;
}
#endif
+#ifdef TCP_QUICKACK
+ if (smtp_in) /* Avoid pure-ACKs while in cmd pingpong phase */
+ (void) setsockopt(fileno(smtp_in), IPPROTO_TCP, TCP_QUICKACK,
+ US &off, sizeof(off));
+#endif
+
switch(smtp_read_command(TRUE))
{
/* The AUTH command is not permitted to occur inside a transaction, and may
"354 Enter message, ending with \".\" on a line by itself\r\n");
}
+#ifdef TCP_QUICKACK
+ if (smtp_in) /* all ACKs needed to ramp window up for bulk data */
+ (void) setsockopt(fileno(smtp_in), IPPROTO_TCP, TCP_QUICKACK,
+ US &on, sizeof(on));
+#endif
done = 3;
message_ended = END_NOTENDED; /* Indicate in middle of data */
static uschar *mail_command; /* Points to MAIL cmd for error messages */
static BOOL update_waiting; /* TRUE to update the "wait" database */
static BOOL pipelining_active; /* current transaction is in pipe mode */
+static int off = 0; /* for use by setsockopt */
/*************************************************
if (!lflags.smtps)
{
- BOOL good_response = smtp_read_response(&inblock, buffer, sizeof(buffer),
+ BOOL good_response;
+
+#ifdef TCP_QUICKACK
+ (void) setsockopt(inblock.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off));
+#endif
+ good_response = smtp_read_response(&inblock, buffer, sizeof(buffer),
'2', ob->command_timeout);
#ifdef EXPERIMENTAL_DSN_INFO
smtp_greeting = string_copy(buffer);
/* Now check if the helo_data expansion went well, and sign off cleanly if
it didn't. */
- if (helo_data == NULL)
+ if (!helo_data)
{
uschar *message = string_sprintf("failed to expand helo_data: %s",
expand_string_message);
static uschar cutthrough_response(char, uschar **);
+static int off = 0; /* for use by setsockopt */
+
/*************************************************
* Retrieve a callout cache record *
if (!smtps || (smtps && tls_out.active >= 0))
#endif
{
+#ifdef TCP_QUICKACK
+ (void) setsockopt(inblock.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off));
+#endif
if (!(done= smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout)))
goto RESPONSE_FAILED;