comparison src/mail/ngx_mail_smtp_handler.c @ 5396:42f874c0b970

Mail: added session close on smtp_greeting_delay violation. A server MUST send greeting before other replies, while before this change in case of smtp_greeting_delay violation the 220 greeting was sent after several 503 replies to commands received before greeting, resulting in protocol synchronization loss. Moreover, further commands were accepted after the greeting. While closing a connection isn't strictly RFC compliant (RFC 5321 requires servers to wait for a QUIT before closing a connection), it's probably good enough for practial uses.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 30 Sep 2013 22:09:50 +0400
parents d620f497c50f
children 04e43d03e153
comparison
equal deleted inserted replaced
5395:a720f0b0e083 5396:42f874c0b970
319 { 319 {
320 return; 320 return;
321 } 321 }
322 322
323 ngx_str_set(&s->out, smtp_invalid_pipelining); 323 ngx_str_set(&s->out, smtp_invalid_pipelining);
324 s->quit = 1;
324 } 325 }
325 326
326 ngx_mail_send(c->write); 327 ngx_mail_send(c->write);
327 } 328 }
328 329