Skip to content

Commit

Permalink
lmtp: Don't deliver truncated email when client disconnects before ".…
Browse files Browse the repository at this point in the history
…" line

This didn't happen always, because the EOF was handled in two different
places in different ways.
  • Loading branch information
sirainen committed Jan 10, 2017
1 parent ecb3be1 commit 2d0fd3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lmtp/commands.c
Expand Up @@ -1247,12 +1247,13 @@ static void client_input_data_handle(struct client *client)
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);
}

Expand Down

0 comments on commit 2d0fd3e

Please sign in to comment.