summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-08-22 13:20:54 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-08-22 13:20:54 +0100
commit3fc73bdc7aa8ac2b2b290033f602bdb947ae8049 (patch)
tree4575897139427c1c17535e310402a1741927a1e5 /src
parent9d2ec425bdb740442417593116a136577e7ddb15 (diff)
Logging: server pipelining offer but no uptake
Diffstat (limited to 'src')
-rw-r--r--src/src/globals.c1
-rw-r--r--src/src/globals.h1
-rw-r--r--src/src/receive.c2
-rw-r--r--src/src/smtp_in.c6
4 files changed, 7 insertions, 3 deletions
diff --git a/src/src/globals.c b/src/src/globals.c
index f1c6a7457..ee1db4b35 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1355,6 +1355,7 @@ double smtp_delay_rcpt = 0.0;
BOOL smtp_enforce_sync = TRUE;
FILE *smtp_in = NULL;
BOOL smtp_in_pipelining_advertised = FALSE;
+BOOL smtp_in_pipelining_used = FALSE;
BOOL smtp_input = FALSE;
int smtp_load_reserve = -1;
int smtp_mailcmd_count = 0;
diff --git a/src/src/globals.h b/src/src/globals.h
index 684c05d57..5b234e225 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -855,6 +855,7 @@ extern uschar *smtp_etrn_command; /* Command to run */
extern BOOL smtp_etrn_serialize; /* Only one at once */
extern FILE *smtp_in; /* Incoming SMTP input file */
extern BOOL smtp_in_pipelining_advertised; /* server advertised PIPELINING */
+extern BOOL smtp_in_pipelining_used; /* server noted client using PIPELINING */
extern int smtp_load_reserve; /* Only from reserved if load > this */
extern int smtp_mailcmd_count; /* Count of MAIL commands */
extern int smtp_max_synprot_errors;/* Max syntax/protocol errors */
diff --git a/src/src/receive.c b/src/src/receive.c
index 39f5b6758..7e5aac15e 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1321,7 +1321,7 @@ if (sender_ident)
if (received_protocol)
g = string_append(g, 2, US" P=", received_protocol);
if (LOGGING(pipelining) && smtp_in_pipelining_advertised)
- g = string_catn(g, US" L", 2);
+ g = string_catn(g, US" L-", smtp_in_pipelining_used ? 2 : 3);
return g;
}
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index e59dece25..840594544 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -391,7 +391,9 @@ if ( !smtp_enforce_sync || !sender_host_address
|| sender_host_notsocket || !smtp_in_pipelining_advertised)
return FALSE;
-return !wouldblock_reading();
+if (wouldblock_reading()) return FALSE;
+smtp_in_pipelining_used = TRUE;
+return TRUE;
}
@@ -2428,7 +2430,7 @@ count_nonmail = TRUE_UNSET;
synprot_error_count = unknown_command_count = nonmail_command_count = 0;
smtp_delay_mail = smtp_rlm_base;
auth_advertised = FALSE;
-smtp_in_pipelining_advertised = FALSE;
+smtp_in_pipelining_advertised = smtp_in_pipelining_used = FALSE;
pipelining_enable = TRUE;
sync_cmd_limit = NON_SYNC_CMD_NON_PIPELINING;
smtp_exit_function_called = FALSE; /* For avoiding loop in not-quit exit */