diff options
author | Stef Walter <stef@memberwebs.com> | 2004-08-25 22:57:22 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-08-25 22:57:22 +0000 |
commit | 3a17efa4267ff1fbb2e1783b1ab7a48a2525d275 (patch) | |
tree | 65932b13db6ed8262660255ac6b38b841b17a1a1 | |
parent | 1ae11397188d9827996ac8e8db0a15b387196437 (diff) |
Reset log line on HELO and EHLO
-rw-r--r-- | common/smtppass.c | 6 | ||||
-rw-r--r-- | src/clamsmtpd.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 0a20777..e26ea07 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -754,6 +754,9 @@ static int smtp_passthru(clamsmtp_context_t* ctx) { messagex(ctx, LOG_DEBUG, "filtering EHLO response"); filter_ehlo = 1; + + /* A new message */ + logline[0] = 0; } /* @@ -782,7 +785,8 @@ static int smtp_passthru(clamsmtp_context_t* ctx) add_to_logline(logline, "to=", ctx->line + r); /* Reset log line */ - else if(is_first_word(ctx->line, RSET_CMD, KL(RSET_CMD))) + else if(is_first_word(ctx->line, RSET_CMD, KL(RSET_CMD)) || + is_first_word(ctx->line, HELO_CMD, KL(HELO_CMD))) logline[0] = 0; /* All other commands just get passed through to server */ diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index 0a20777..e26ea07 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -754,6 +754,9 @@ static int smtp_passthru(clamsmtp_context_t* ctx) { messagex(ctx, LOG_DEBUG, "filtering EHLO response"); filter_ehlo = 1; + + /* A new message */ + logline[0] = 0; } /* @@ -782,7 +785,8 @@ static int smtp_passthru(clamsmtp_context_t* ctx) add_to_logline(logline, "to=", ctx->line + r); /* Reset log line */ - else if(is_first_word(ctx->line, RSET_CMD, KL(RSET_CMD))) + else if(is_first_word(ctx->line, RSET_CMD, KL(RSET_CMD)) || + is_first_word(ctx->line, HELO_CMD, KL(HELO_CMD))) logline[0] = 0; /* All other commands just get passed through to server */ |