summaryrefslogtreecommitdiffhomepage
path: root/src/mail (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-29Style: changed checks of ngx_ssl_create_connection() to != NGX_OK.Maxim Dounin1-1/+1
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.
2017-04-18SSL: added support for TLSv1.3 in ssl_protocols directive.Sergey Kandaurov1-0/+1
Support for the TLSv1.3 protocol will be introduced in OpenSSL 1.1.1.
2017-04-03Mail: configurable socket buffer sizes.Vladimir Homutov3-1/+39
The "rcvbuf" and "sndbuf" parameters are now supported by the "listen" directive.
2017-03-06Mail: don't emit separator in capability lists for APOP.Sergey Kandaurov1-0/+16
Notably, this fixes CAPA and AUTH output. The bug had appeared in nginx 1.11.6 (73b451d304c0).
2017-01-12Mail: make it possible to disable SASL EXTERNAL.Sergey Kandaurov3-4/+16
2016-12-24Win32: fixed some warnings reported by Borland C.Maxim Dounin1-1/+1
Most notably, warning W8012 (comparing signed and unsigned values) reported in multiple places where an unsigned value of small type (e.g., u_short) is promoted to an int and compared to an unsigned value. Warning W8072 (suspicious pointer arithmetic) disabled, it is reported when we increment base pointer in ngx_shm_alloc().
2016-10-08Mail: support SASL EXTERNAL (RFC 4422).Rob N ★10-15/+110
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.
2016-10-18Mail: extensible auth methods in pop3 module.Maxim Dounin1-28/+66
2016-10-10Modules compatibility: removed dependencies on NGX_MAIL_SSL.Maxim Dounin1-4/+0
External structures are now identical regardless of mail SSL module compiled in or not.
2016-10-03Modules compatibility: removed unneeded IPV6_V6ONLY checks.Maxim Dounin3-3/+3
The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support.
2016-09-20Fixed log levels of configuration parsing errors.Valentin Bartenev1-2/+2
All the errors that prevent loading configuration must be printed on the "emerg" log level. Previously, nginx might silently fail to load configuration in some cases as the default log level is "error".
2016-08-17Ensure "listen" exists in a mail or stream server (ticket #1049).Roman Arutyunyan2-0/+11
2016-08-18Fixed wrong type of the "line" field.Roman Arutyunyan1-1/+1
The new type ngx_uint_t was supposed when formatting the line number.
2016-06-20Fixed build on MSVC.Roman Arutyunyan1-1/+1
2016-06-20Introduced ngx_inet_get_port() and ngx_inet_set_port() functions.Roman Arutyunyan2-48/+7
2016-06-15SSL: ngx_ssl_ciphers() to set list of ciphers.Tim Taubert1-14/+3
This patch moves various OpenSSL-specific function calls into the OpenSSL module and introduces ngx_ssl_ciphers() to make nginx more crypto-library-agnostic.
2016-05-23Renamed "u" to "sockaddr" in listen options types.Maxim Dounin3-15/+15
2016-05-23Introduced the ngx_sockaddr_t type.Ruslan Ermilov2-12/+2
It's properly aligned and can hold any supported sockaddr.
2016-05-20Use ngx_cmp_sockaddr() where appropriate.Ruslan Ermilov2-51/+6
2016-05-19SSL: support for multiple curves (ticket #885).Maxim Dounin1-1/+1
OpenSSL 1.0.2+ allows configuring a curve list instead of a single curve previously supported. This allows use of different curves depending on what client supports (as available via the elliptic_curves extension), and also allows use of different curves in an ECDHE key exchange and in the ECDSA certificate. The special value "auto" was introduced (now the default for ssl_ecdh_curve), which means "use an internal list of curves as available in the OpenSSL library used". For versions prior to OpenSSL 1.0.2 it maps to "prime256v1" as previously used. The default in 1.0.2b+ prefers prime256v1 as well (and X25519 in OpenSSL 1.1.0+). As client vs. server preference of curves is controlled by the same option as used for ciphers (SSL_OP_CIPHER_SERVER_PREFERENCE), the ssl_prefer_server_ciphers directive now controls both.
2016-05-19SSL: support for multiple certificates (ticket #814).Maxim Dounin2-17/+33
2016-03-31SSL: RSA_generate_key() is deprecated in OpenSSL 1.1.0.Maxim Dounin1-1/+1
OpenSSL removed support for all 40 and 56 bit ciphers.
2016-03-31Fixed logging.Sergey Kandaurov2-2/+2
2016-03-30Style.Ruslan Ermilov3-5/+5
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin2-18/+18
2016-02-04Dynamic modules: moved module-related stuff to separate files.Maxim Dounin1-8/+1
2015-08-17Win32: MSVC 2015 compatibility.Maxim Dounin1-2/+1
Resolved warnings about declarations that hide previous local declarations. Warnings about WSASocketA() being deprecated resolved by explicit use of WSASocketW() instead of WSASocket(). When compiling without IPv6 support, WinSock deprecated warnings are disabled to allow use of gethostbyname().
2015-06-16Disabled duplicate http, mail, and stream blocks.Vladimir Homutov1-0/+4
Such configurations have very limited use, introduce various problems and are not officially supported.
2015-06-08Mail: listen backlog=.Ruslan Ermilov3-0/+17
2015-06-08Mail: embed ngx_mail_listen_t into ngx_mail_conf_addr_t.Ruslan Ermilov3-68/+48
2015-05-25Disabled SSLv3 by default (ticket #653).Maxim Dounin1-1/+1
2015-05-20Simplified ngx_http_init_listening().Maxim Dounin1-7/+1
There is no need to set "i" to 0, as it's expected to be 0 assuming the bindings are properly sorted, and we already rely on this when explicitly set hport->naddrs to 1. Remaining conditional code is replaced with identical "hport->naddrs = i + 1". Identical modifications are done in the mail and stream modules, in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers() functions, respectively. No functional changes.
2015-04-29Removed the deprecated "imap" directive.Ruslan Ermilov1-13/+0
2015-04-29Removed the deprecated "so_keepalive" directive.Ruslan Ermilov3-31/+0
2015-02-20Mail: error_log support.Vladimir Homutov4-19/+54
2015-03-23SSL: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.Maxim Dounin1-0/+2
LibreSSL removed support for export ciphers and a call to SSL_CTX_set_tmp_rsa_callback() results in an error left in the error queue. This caused alerts "ignoring stale global SSL error (...called a function you should not call) while SSL handshaking" on a first connection in each worker process.
2015-03-04Style: use %*s format, as in 68d21fd1dc64.Ruslan Ermilov1-8/+3
2015-02-27Mail: don't emit Auth-SSL-Verify with disabled ssl_verify_client.Sergey Kandaurov1-5/+9
Previously, the Auth-SSL-Verify header with the "NONE" value was always passed to the auth_http script if verification of client certificates is disabled.
2015-02-25Mail: client SSL certificates support.Maxim Dounin8-4/+294
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.
2015-02-25Mail: added Auth-SSL header to indicate SSL.Maxim Dounin1-0/+12
Based on a patch by Filipe da Silva.
2015-02-25Mail: fixed buffer allocation for CRLF after Auth-SMTP-* headers.Maxim Dounin1-3/+3
There were no buffer overruns in real life as there is extra space allocated for the Auth-Login-Attempt counter.
2015-01-23Mail: fixed the duplicate listen address detection.Ruslan Ermilov1-2/+2
2015-01-23Mail: fixed a comment.Ruslan Ermilov1-1/+1
2014-09-01Mail: initialize the "signature" field of ngx_mail_session_t.Valentin Bartenev1-0/+2
Currently it isn't used, but it can be suitable to distinguish objects stored in c->data.
2014-08-20Mail: fixed number of arguments allowed in the listen directive.Valentin Bartenev1-1/+1
2014-08-20Mail: fixed a comment.Valentin Bartenev1-2/+1
There's no loc_conf in the mail module.
2014-08-05Mail: discard pipelined commands after SMTP STARTTLS.Maxim Dounin1-0/+3
The bug had appeared in nginx 1.5.6 (04e43d03e153). Reported by Chris Boulton.
2014-06-16SSL: the "ssl_password_file" directive.Valentin Bartenev2-1/+38
2014-05-22Mail: output client port number on client connects (ticket #531).Ruslan Ermilov1-2/+6
2014-05-21Mail: added a check for the number of arguments in MAIL/RCPT.Maxim Dounin1-0/+10
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.