diff options
author | Stef Walter <stef@memberwebs.com> | 2007-06-21 22:48:49 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2007-06-21 22:48:49 +0000 |
commit | 899d91e7fe956341a805b3744037530afc6d210f (patch) | |
tree | d0b6f13b864b5a5ef9fc3f76abd07efef8407148 /common/smtppass.c | |
parent | 4093e901218ff6293aa9543f6468b75edc23c9f1 (diff) |
Send an RSET to the server after filter fails some data.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r-- | common/smtppass.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 25d657c..5532927 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -98,6 +98,7 @@ spthread_t; #define SMTP_DATA "DATA" CRLF #define SMTP_NOOP "NOOP" CRLF +#define SMTP_RSET "RSET" CRLF #define SMTP_XCLIENT "XCLIENT ADDR=%s" CRLF #define SMTP_BANNER "220 smtp.passthru" CRLF #define SMTP_HELO_RSP "250 smtp.passthru" CRLF @@ -1711,6 +1712,11 @@ int sp_fail_data(spctx_t* ctx, const char* smtp_status) if(spio_write_data(ctx, &(ctx->client), smtp_status) == -1) return -1; + /* Tell the server to forget about the current message */ + if(spio_write_data(ctx, &(ctx->server), SMTP_RSET) == -1 || + read_server_response(ctx) == -1) + return -1; + return 0; } |