From e2c0ce20df5987ec798f86f0be1cf38d48f7213c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 16 Aug 2004 16:13:47 +0000 Subject: Custom headers need CRLF appended --- common/smtppass.c | 6 +++--- src/clamsmtpd.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/smtppass.c b/common/smtppass.c index e529dde..6b43058 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -125,7 +125,7 @@ clamsmtp_thread_t; #define DEFAULT_CLAMAV "/var/run/clamav/clamd" #define DEFAULT_MAXTHREADS 64 #define DEFAULT_TIMEOUT 180 -#define DEFAULT_HEADER "X-AV-Checked: ClamAV using ClamSMTP\r\n" +#define DEFAULT_HEADER "X-AV-Checked: ClamAV using ClamSMTP" /* ----------------------------------------------------------------------- * GLOBALS @@ -1287,8 +1287,8 @@ static int transfer_from_file(clamsmtp_context_t* ctx, const char* filename) */ if(is_blank_line(ctx->line)) { - if(write_data_raw(ctx, &(ctx->server), (char*)g_header, - strlen(g_header)) == -1) + if(write_data_raw(ctx, &(ctx->server), (char*)g_header, strlen(g_header)) == -1 || + write_data_raw(ctx, &(ctx->server), CRLF, KL(CRLF)) == -1) RETURN(-1); header = 1; diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index e529dde..6b43058 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -125,7 +125,7 @@ clamsmtp_thread_t; #define DEFAULT_CLAMAV "/var/run/clamav/clamd" #define DEFAULT_MAXTHREADS 64 #define DEFAULT_TIMEOUT 180 -#define DEFAULT_HEADER "X-AV-Checked: ClamAV using ClamSMTP\r\n" +#define DEFAULT_HEADER "X-AV-Checked: ClamAV using ClamSMTP" /* ----------------------------------------------------------------------- * GLOBALS @@ -1287,8 +1287,8 @@ static int transfer_from_file(clamsmtp_context_t* ctx, const char* filename) */ if(is_blank_line(ctx->line)) { - if(write_data_raw(ctx, &(ctx->server), (char*)g_header, - strlen(g_header)) == -1) + if(write_data_raw(ctx, &(ctx->server), (char*)g_header, strlen(g_header)) == -1 || + write_data_raw(ctx, &(ctx->server), CRLF, KL(CRLF)) == -1) RETURN(-1); header = 1; -- cgit v1.2.3