aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_handler.c
Commit message (Collapse)AuthorAge
* SSL: removed the "ssl" directive.Roman Arutyunyan2023-06-08
| | | | | | It has been deprecated since 7270:46c0c7ef4913 (1.15.0) in favour of the "ssl" parameter of the "listen" directive, which has been available since 2224:109849282793 (0.7.14).
* Mail: max_errors directive.Maxim Dounin2021-05-19
| | | | | Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands in Exim, specifies the number of errors after which the connection is closed.
* Mail: fixed reading with fully filled buffer (ticket #2159).Maxim Dounin2021-04-21
| | | | | | | | | | | With SMTP pipelining, ngx_mail_read_command() can be called with s->buffer without any space available, to parse additional commands received to the buffer on previous calls. Previously, this resulted in recv() being called with zero length, resulting in zero being returned, which was interpreted as a connection close by the client, so nginx silently closed connection. Fix is to avoid calling c->recv() if there is no free space in the buffer, but continue parsing of the already received commands.
* Mail: fixed build without SSL.Maxim Dounin2021-03-11
| | | | | | Broken by d84f13618277 and 12ea1de7d87c (1.19.8). Reported by Sergey Osokin.
* Mail: realip module.Maxim Dounin2021-03-05
| | | | | When configured with the "set_real_ip_from", it can set client's IP address as visible in logs to the one obtained via the PROXY protocol.
* Mail: parsing of the PROXY protocol from clients.Maxim Dounin2021-03-05
| | | | | | | Activated with the "proxy_protocol" parameter of the "listen" directive. Obtained information is passed to the auth_http script in Proxy-Protocol-Addr, Proxy-Protocol-Port, Proxy-Protocol-Server-Addr, and Proxy-Protocol-Server-Port headers.
* Mail: fixed log action after SSL handshake.Maxim Dounin2021-03-05
|
* Mail: postponed session initialization under accept mutex.Maxim Dounin2021-03-05
| | | | | | Similarly to 40e8ce405859 in the stream module, this reduces the time accept mutex is held. This also simplifies following changes to introduce PROXY protocol support.
* 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.
* SSL: detect "listen ... ssl" without certificates (ticket #178).Maxim Dounin2018-04-24
| | | | | | | | | In mail and stream modules, no certificate provided is a fatal condition, much like with the "ssl" and "starttls" directives. In http, "listen ... ssl" can be used in a non-default server without certificates as long as there is a certificate in the default one, so missing certificate is only fatal for default servers.
* SSL: using default server context in session remove (closes #1464).Sergey Kandaurov2018-01-30
| | | | | This fixes segfault in configurations with multiple virtual servers sharing the same port, where a non-default virtual server block misses certificate.
* Style: changed checks of ngx_ssl_create_connection() to != NGX_OK.Maxim Dounin2017-05-29
| | | | | | In http these checks were changed in a6d6d762c554, though mail module was missed at that time. Since then, the stream module was introduced based on mail, using "== NGX_ERROR" check.
* 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.
* Mail: error_log support.Vladimir Homutov2015-02-20
|
* Mail: client SSL certificates support.Maxim Dounin2015-02-25
| | | | | | | | | | | | | | | | | | The "ssl_verify_client", "ssl_verify_depth", "ssl_client_certificate", "ssl_trusted_certificate", and "ssl_crl" directives introduced to control SSL client certificate verification in mail proxy module. If there is a certificate, detail of the certificate are passed to the auth_http script configured via Auth-SSL-Verify, Auth-SSL-Subject, Auth-SSL-Issuer, Auth-SSL-Serial, Auth-SSL-Fingerprint headers. If the auth_http_pass_client_cert directive is set, client certificate in PEM format will be passed in the Auth-SSL-Cert header (urlencoded). If there is no required certificate provided during an SSL handshake or certificate verification fails then a protocol-specific error is returned after the SSL handshake and the connection is closed. Based on previous work by Sven Peter, Franck Levionnois and Filipe Da Silva.
* Mail: initialize the "signature" field of ngx_mail_session_t.Valentin Bartenev2014-09-01
| | | | | Currently it isn't used, but it can be suitable to distinguish objects stored in c->data.
* Mail: output client port number on client connects (ticket #531).Ruslan Ermilov2014-05-22
|
* Mail: fixed ngx_mail_send() (ticket #519).Maxim Dounin2014-03-31
|
* Fixed format specifier in logging of "c->number".Sergey Kandaurov2014-03-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).
* Removed a stale "AF_INET only" comment.Ruslan Ermilov2012-08-17
| | | | IPv6 client connections in mail modules have been supported since r2856.
* Copyright updated.Maxim Konovalov2012-01-18
|
* style fixIgor Sysoev2010-06-23
|
* ignore ngx_atomic_fetch_add() resultIgor Sysoev2009-06-18
| | | | this fixes building at least by gcc 4.2.1 on Mac OS X 10.6
* mail proxy listen IPv6 supportIgor Sysoev2009-05-18
|
* axe imap module artifactsIgor Sysoev2009-05-04
|
* compatibility with Microsoft'sIgor Sysoev2009-02-09
| | | | | AUTH LOGIN [base64 encoded user name ] patch by Maxim Dounin
* use "!= NGX_OK" instead of "== NGX_ERROR"Igor Sysoev2008-12-09
|
* *) listen sslIgor Sysoev2008-09-01
| | | | *) no default ssl_cetificate and ssl_cetificate_key
* backout both r2162 and r2128 and implement a new fixIgor Sysoev2008-08-12
|
* *) back out r2040Igor Sysoev2008-06-17
| | | | | | *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
* move condition declarations inside blocks where they are usedIgor Sysoev2007-12-10
|
* fix "AUTH PLAIN [initial-response]" bug introduced in r1477Igor Sysoev2007-09-21
|
* log starttlsIgor Sysoev2007-09-20
|
* ngx_mail_pop3_module, ngx_mail_imap_module, and ngx_mail_smtp_moduleIgor Sysoev2007-09-15
|
* optimizationsIgor 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
|
* decrement active connection counter in mail proxyIgor Sysoev2007-09-11
|
* IMAP AUTHENTICATEIgor Sysoev2007-07-20
| | | | patch by Maxim Dounin
* SMTP STARTTLSIgor Sysoev2007-07-20
| | | | patch by Maxim Dounin
* fix segfault when CRAM-MD5 is not enabled but client tries itIgor Sysoev2007-07-11
|
* style fix: remove tabsIgor Sysoev2007-04-18
|
* Many changes:Igor Sysoev2007-03-19
*) rename imap to mail, sort pop3/imap functions *) smtp auth support *) pop3 starttls only *) fix segfault if cram-md5 was used without apop