summaryrefslogtreecommitdiff
path: root/common/smtppass.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2010-11-02 16:39:06 +0000
committerStef Walter <stef@thewalter.net>2011-01-23 15:47:45 -0600
commitfcec3bb91a0cb961054b9475c92929c3dae149e7 (patch)
tree729555953b12493eaaabcd7086c7d7640873d3dc /common/smtppass.c
parentb8dafc3005f6ceb4e509933068d6a53a40366260 (diff)
Send the proper data end signature to server.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r--common/smtppass.c8
1 files changed, 7 insertions, 1 deletions
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");