diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-31 15:14:51 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-31 15:14:51 +0100 |
commit | 0d9fa8c0a3e0e3dd140880861a60c3def18f176b (patch) | |
tree | 758bef9618a463e4f8c9ba762722e6c6ef987cff /src | |
parent | e12b4599116088918a8a0f7a7dc36f1ec75496b3 (diff) |
Logging: Fix logging of errors under PIPELINING
Diffstat (limited to 'src')
-rw-r--r-- | src/src/transports/smtp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 4884ea937..c84323c17 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -279,6 +279,7 @@ static uschar *rf_names[] = { US"NEVER", US"SUCCESS", US"FAILURE", US"DELAY" }; static uschar *smtp_command; /* Points to last cmd for error messages */ 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 */ /************************************************* @@ -507,13 +508,7 @@ static BOOL check_response(host_item *host, int *errno_value, int more_errno, uschar *buffer, int *yield, uschar **message, BOOL *pass_message) { -uschar *pl = US""; - -if (smtp_use_pipelining && - (Ustrcmp(smtp_command, "MAIL") == 0 || - Ustrcmp(smtp_command, "RCPT") == 0 || - Ustrcmp(smtp_command, "DATA") == 0)) - pl = US"pipelined "; +uschar * pl = pipelining_active ? US"pipelined " : US""; *yield = '4'; /* Default setting is to give a temporary error */ @@ -1971,6 +1966,7 @@ if (continue_hostname == NULL case FAIL: goto RESPONSE_FAILED; } } +pipelining_active = smtp_use_pipelining; /* The setting up of the SMTP call is now complete. Any subsequent errors are message-specific. */ @@ -2326,6 +2322,7 @@ if (ok || (smtp_use_pipelining && !mua_wrapper)) case -1: goto END_OFF; /* Timeout on RCPT */ default: goto RESPONSE_FAILED; /* I/O error, or any MAIL/DATA error */ } + pipelining_active = FALSE; } /* Save the first address of the next batch. */ @@ -2447,7 +2444,9 @@ else int delivery_time = (int)(time(NULL) - start_delivery_time); int len; uschar *conf = NULL; + send_rset = FALSE; + pipelining_active = FALSE; /* Set up confirmation if needed - applies only to SMTP */ |