summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-10-08 18:56:13 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-10-08 18:56:13 +0100
commit9e0ed81fc2a821e60dd3235c4e5598ab45cfcc1e (patch)
tree036c0ca59cccafbf4e08e2e05b0e4ddf6bbf0222 /src
parent44e6c20c0d355daceb76ecc2c014b4af4cea1031 (diff)
Logging: show when input from truncated for logging "next input sent too soon"
Diffstat (limited to 'src')
-rw-r--r--src/src/smtp_in.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 0f8d5599b..9847c86c7 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -565,11 +565,12 @@ for(;;)
incomplete_transaction_log(US"sync failure");
log_write(0, LOG_MAIN|LOG_REJECT, "SMTP protocol synchronization error "
"(next input sent too soon: pipelining was not advertised): "
- "rejected \"%s\" %s next input=\"%s\"",
+ "rejected \"%s\" %s next input=\"%s\"%s",
smtp_cmd_buffer, host_and_ident(TRUE),
- string_printing(string_copyn(smtp_inptr, n)));
- (void) synprot_error(L_smtp_protocol_error, 554, NULL,
- US"SMTP synchronization error");
+ string_printing(string_copyn(smtp_inptr, n)),
+ smtp_inend - smtp_inptr > n ? "..." : "");
+ (void) synprot_error(L_smtp_protocol_error, 554, NULL,
+ US"SMTP synchronization error");
goto repeat_until_rset;
}