dovecot-2.0: lmtp: Make sure we partial messages aren't saved if...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 1 23:42:21 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/a75e62340aa5
changeset: 12230:a75e62340aa5
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 01 21:42:18 2010 +0100
description:
lmtp: Make sure we partial messages aren't saved if client disconnects during DATA.

diffstat:

 src/lmtp/commands.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r da9185d1309c -r a75e62340aa5 src/lmtp/commands.c
--- a/src/lmtp/commands.c	Fri Oct 01 21:33:38 2010 +0100
+++ b/src/lmtp/commands.c	Fri Oct 01 21:42:18 2010 +0100
@@ -801,6 +801,12 @@
 	if (ret == 0)
 		return;
 
+	if (!client->dot_input->eof) {
+		/* client probably disconnected */
+		client_destroy(client, NULL, NULL);
+		return;
+	}
+
 	if (client_input_data_write(client))
 		client_input_data_finish(client);
 }


More information about the dovecot-cvs mailing list