Mercurial > dovecot > core-2.2
changeset 21376:bf68ba0a9e23
lmtp: Don't deliver truncated email when client disconnects before "." line
This didn't happen always, because the EOF was handled in two different
places in different ways.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 09 Jan 2017 15:12:48 +0200 |
parents | f13f90cd5420 |
children | f482a60bc73a |
files | src/lmtp/commands.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lmtp/commands.c Tue Jan 10 15:55:17 2017 +0200 +++ b/src/lmtp/commands.c Mon Jan 09 15:12:48 2017 +0200 @@ -1247,12 +1247,13 @@ if (ret == 0) return; - if (!client->dot_input->eof) { + if (client->dot_input->stream_errno != 0) { /* client probably disconnected */ client_destroy(client, NULL, NULL); return; } + /* the ending "." line was seen. begin saving the mail. */ client_input_data_write(client); }