From fcec3bb91a0cb961054b9475c92929c3dae149e7 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 2 Nov 2010 16:39:06 +0000 Subject: Send the proper data end signature to server. --- common/smtppass.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/smtppass.c b/common/smtppass.c index f9c4328..93946d5 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -901,9 +901,15 @@ static int data_passthru(spctx_t* ctx) count += r; - if(spio_write_data_raw(ctx, &(ctx->server), (unsigned char*)data, r) == -1) + if(spio_write_data_raw(ctx, &(ctx->server), (unsigned char*)data, r) < 0) return -1; + } + if(spio_write_data(ctx, &(ctx->server), DATA_END_SIG) < 0) + { + /* Tell the client it went wrong */ + spio_write_data(ctx, &(ctx->client), SMTP_FAILED); + return -1; } sp_add_log(ctx, "status=", "SKIPPED"); -- cgit v1.2.3