Mercurial > hg > nginx-mail
comparison src/mail/ngx_mail_smtp_handler.c @ 435:e2df123bbbe2
Mail: close session on smtp_greeting_delay violation.
Server MUST send greeting before other replies, while before this change it
sends 503 replies to commands received before greeting, then sends 220
greeting, and then accepts more commands.
This patch is quick-fix and doesn't really rfc-complaint, since closing
connection isn't allowed by RFC. The rfc-complaint options are:
1. Send 220 greeting and then process commands as valid. Probably make sense
if information about violation will be available to spam filtering engine
later.
2. Send 554 greeting and wait for the client to send a QUIT (see RFC 2821,
section "3.1 Session Initiation").
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 10 Sep 2008 23:05:54 +0400 |
parents | cd9cb7a3ff9e |
children | 9b19e26b2660 |
comparison
equal
deleted
inserted
replaced
434:375518f786db | 435:e2df123bbbe2 |
---|---|
296 return; | 296 return; |
297 } | 297 } |
298 | 298 |
299 s->out.len = sizeof(smtp_invalid_pipelining) - 1; | 299 s->out.len = sizeof(smtp_invalid_pipelining) - 1; |
300 s->out.data = smtp_invalid_pipelining; | 300 s->out.data = smtp_invalid_pipelining; |
301 s->quit = 1; | |
301 } | 302 } |
302 | 303 |
303 ngx_mail_send(c->write); | 304 ngx_mail_send(c->write); |
304 } | 305 } |
305 | 306 |