From eb4d31917af2c3f9debec731b1ecb69779b4618b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 25 Aug 2004 23:29:03 +0000 Subject: Fixed some ESMTP bugs --- src/clamsmtpd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index e26ea07..a969e74 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -721,6 +721,10 @@ static int smtp_passthru(clamsmtp_context_t* ctx) continue; } + /* Only valid after an EHLO command */ + if(filter_ehlo) + filter_ehlo = 0; + /* Handle the DATA section via our AV checker */ if(is_first_word(ctx->line, DATA_CMD, KL(DATA_CMD))) { @@ -851,15 +855,10 @@ static int smtp_passthru(clamsmtp_context_t* ctx) is_first_word(p, ESMTP_BINARY, KL(ESMTP_BINARY)) || is_first_word(p, ESMTP_CHECK, KL(ESMTP_CHECK))) { - messagex(ctx, LOG_DEBUG, "filtered ESMTP feature: %s", p); + messagex(ctx, LOG_DEBUG, "filtered ESMTP feature: %s", trim_space(p)); continue; } } - else - { - filter_ehlo = 0; - messagex(ctx, LOG_DEBUG, "done filtering ESMTP response"); - } } if(write_data(ctx, &(ctx->client), ctx->line) == -1) -- cgit v1.2.3