aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_smtp_handler.c
Commit message (Collapse)AuthorAge
* Mail: added missing event handling after reading data.Maxim Dounin2021-03-05
| | | | | | | | | | | | | If we need to be notified about further events, ngx_handle_read_event() needs to be called after a read event is processed. Without this, an event can be removed from the kernel and won't be reported again, notably when using oneshot event methods, such as eventport on Solaris. For consistency, existing ngx_handle_read_event() call removed from ngx_mail_read_command(), as this call only covers one of the code paths where ngx_mail_read_command() returns NGX_AGAIN. Instead, appropriate processing added to the callers, covering all code paths where NGX_AGAIN is returned.
* Mail: added missing event handling after blocking events.Maxim Dounin2021-03-05
| | | | | | | As long as a read event is blocked (ignored), ngx_handle_read_event() needs to be called to make sure no further notifications will be triggered when using level-triggered event methods, such as select() or poll().
* Mail: fixed duplicate resolving.Maxim Dounin2019-08-01
| | | | | | | | | | | | When using SMTP with SSL and resolver, read events might be enabled during address resolving, leading to duplicate ngx_mail_ssl_handshake_handler() calls if something arrives from the client, and duplicate session initialization - including starting another resolving. This can lead to a segmentation fault if the session is closed after first resolving finished. Fix is to block read events while resolving. Reported by Robert Norris, http://mailman.nginx.org/pipermail/nginx/2019-July/058204.html.
* Mail: make it possible to disable SASL EXTERNAL.Sergey Kandaurov2017-01-12
|
* Mail: support SASL EXTERNAL (RFC 4422).Rob N ★2016-10-08
| | | | | | | | | | | This is needed to allow TLS client certificate auth to work. With ssl_verify_client configured, the auth daemon can choose to allow the connection to proceed based on the certificate data. This has been tested with Thunderbird for IMAP only. I've not yet found a client that will do client certificate auth for POP3 or SMTP, and the method is not really documented anywhere that I can find. That said, its simple enough that the way I've done is probably right.
* Style.Ruslan Ermilov2016-03-30
|
* Mail: discard pipelined commands after SMTP STARTTLS.Maxim Dounin2014-08-05
| | | | | | The bug had appeared in nginx 1.5.6 (04e43d03e153). Reported by Chris Boulton.
* Mail: added a check for the number of arguments in MAIL/RCPT.Maxim Dounin2014-05-21
| | | | | | | | Missed during introduction of the SMTP pipelining support (04e43d03e153, 1.5.6). Previously, the check wasn't needed as s->buffer was used directly and the number of arguments didn't matter. Reported by Svyatoslav Nikolsky.
* Resolver: implemented IPv6 name to address resolving.Ruslan Ermilov2013-12-09
|
* Changed resolver API to use ngx_addr_t.Ruslan Ermilov2013-12-06
|
* Mail: smtp pipelining support.Maxim Dounin2013-09-30
| | | | | | | | | | | Basically, this does the following two changes (and corresponding modifications of related code): 1. Does not reset session buffer unless it's reached it's end, and always wait for LF to terminate command (even if we detected invalid command). 2. Record command name to make it available for handlers (since now we can't assume that command starts from s->buffer->start).
* Mail: added session close on smtp_greeting_delay violation.Maxim Dounin2013-09-30
| | | | | | | | | | | | 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.
* Copyright updated.Maxim Konovalov2012-01-18
|
* ngx_str_set() and ngx_str_null()Igor Sysoev2010-05-14
|
* *) fix resolving an empty name ("."),Igor Sysoev2009-11-09
| | | | | *) add quotes in an error message, *) backout r3299 in ngx_mail_smtp_handler.c
* fix "PTR ." case in address resolverIgor Sysoev2009-11-09
|
* mail proxy listen IPv6 supportIgor Sysoev2009-05-18
|
* compatibility with Microsoft'sIgor Sysoev2009-02-09
| | | | | AUTH LOGIN [base64 encoded user name ] patch by Maxim Dounin
* avoid deep nested calls, flatten call treeIgor Sysoev2009-01-31
|
* use "!= NGX_OK" instead of "== NGX_ERROR"Igor Sysoev2008-12-09
|
* smtp_auth noneIgor Sysoev2008-11-13
| | | | patch by Maxim Dounin
* *) back out r2040Igor Sysoev2008-06-17
| | | | | | *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
* do not resolve SMTP clients by defaultIgor Sysoev2008-02-16
|
* resolver in smtp proxy moduleIgor Sysoev2008-02-13
|
* fix STARTTLS prompt in SMTPIgor Sysoev2007-12-21
|
* move condition declarations inside blocks where they are usedIgor Sysoev2007-12-10
|
* use "_" instead of " " as new line substitute, do not delete trailing new lineIgor Sysoev2007-09-21
|
* ngx_mail_pop3_module, ngx_mail_imap_module, and ngx_mail_smtp_moduleIgor Sysoev2007-09-15
|
* style fix: remove trailing spacesIgor Sysoev2007-09-14
|
* create salt just before it will be usedIgor Sysoev2007-09-14
|
* fix r1482Igor Sysoev2007-09-14
|
* ngx_mail_smtp_create_buffer()Igor Sysoev2007-09-14
|
* optimizationsIgor Sysoev2007-09-14
|
* smtp_client_buffer and smtp_greeting_delayIgor Sysoev2007-09-14
|
* move event handling to protocol specific code,Igor Sysoev2007-09-14
| | | | it is required to support SMTP greeting delay
* optimizationsIgor Sysoev2007-09-13
|
* style fix and optimizationsIgor Sysoev2007-09-13
|
* split pop3, imap, and smtp handlersIgor Sysoev2007-09-13