diff options
author | Stef Walter <stef@thewalter.net> | 2010-11-17 15:23:27 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2011-01-23 15:47:45 -0600 |
commit | e374ed13a73618e8f5d4509dacb1e264791cd57b (patch) | |
tree | 30812fe1594c7f673f2979667f21fa9b5dd43f80 /common | |
parent | 78658c88caf7e6374efbbb451159da261e3b0695 (diff) |
Parse MAIL FROM and RCPT TO properly, and skip authenticated.
Diffstat (limited to 'common')
-rw-r--r-- | common/smtppass.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 8cc0522..00347d9 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -1075,18 +1075,21 @@ static int smtp_passthru(spctx_t* ctx) auth_started = 1; } - else if(is_first_word(C_LINE, FROM_CMD, KL(FROM_CMD)) || - is_first_word(C_LINE, TO_CMD, KL(TO_CMD))) + else if(check_first_word(C_LINE, FROM_CMD, KL(FROM_CMD), SMTP_DELIMS) > 0 || + check_first_word(C_LINE, TO_CMD, KL(TO_CMD), SMTP_DELIMS) > 0) { - r = cb_check_pre(ctx); - if(r < 0) + if(!should_skip_processing(ctx)) { - RETURN(-1); - } - else if(r == 0) - { - cleanup_context(ctx); - continue; + r = cb_check_pre(ctx); + if(r < 0) + { + RETURN(-1); + } + else if(r == 0) + { + cleanup_context(ctx); + continue; + } } } |