Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions data/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2847,10 +2847,27 @@ services.*.port:
services.*.ssl_mode:
type: string
default: ""
values: [ssl, starttls, "no"]
values: [ssl, starttls, required, "no"]
description: |
TLS mode: `ssl` is implicit TLS; `starttls` is plain with a STARTTLS
upgrade; `no` is plain only.
upgrade; `required` is `starttls` with no authentication before TLS;
`no` is plain only. `required` applies to `imap_login`, `pop3_login`,
`submission_login` and `managesieve_login`, needs a certificate and
`auth_allow_cleartext: false`; the server refuses to start otherwise.
Under `required` a connection is secured by TLS, a local peer, or a PROXY
header whose `PP2_TYPE_SSL` TLV carries `PP2_CLIENT_SSL`; a peer in
`general.xclient.trusted_nets` and a plain PROXY header are not. Before
that no mechanism is offered, SCRAM included: IMAP advertises
`LOGINDISABLED` and no `AUTH=`, POP3 neither `USER` nor `SASL`,
ManageSieve no `SASL`, EHLO no `AUTH`. `AUTHENTICATE`/`AUTH` get
"Authentication disallowed on non-secure (SSL/TLS) connections." (IMAP
`NO [PRIVACYREQUIRED]`, POP3 `-ERR [AUTH]`, ManageSieve
`NO (ENCRYPT-NEEDED)`), logged as `Login failed: SSL required for
authentication`; `LOGIN` and `USER`/`PASS` get the
`auth_allow_cleartext` refusal. Submission answers every command but
EHLO, STARTTLS, NOOP and QUIT with `530 5.7.0 TLS required.` In the
chart: `components.<login>.listeners.<listener>.ssl_mode`, `starttls` by
default.

services.*.haproxy_protocol:
type: boolean
Expand All @@ -2859,6 +2876,10 @@ services.*.haproxy_protocol:
description: |
Extract the real client IP from the HAProxy PROXY header. Uses
`general.haproxy` for the timeout and trusted nets.
yarilo-managesieve-login reads it and the general trusted networks like
the other login proxies; its pre-2.4.7 `managesieve_login_service.haproxy_protocol`
and `managesieve_login_service.haproxy_trusted_nets` are still accepted
with a warning, and when both nets keys are set the general one is used.

services.*.xclient_protocol:
type: boolean
Expand All @@ -2880,8 +2901,7 @@ services.*.auth_allow_cleartext:
secured by TLS (implicit or after STARTTLS/STLS), by a local peer (same
IP on both ends of the socket), by a peer in
`general.xclient.trusted_nets`, or by a PROXY header accepted from
`general.haproxy.haproxy_trusted_networks` (ManageSieve:
`managesieve_login_service.haproxy_trusted_nets`). While refused, IMAP
`general.haproxy.haproxy_trusted_networks`. While refused, IMAP
advertises `LOGINDISABLED` instead of `AUTH=PLAIN AUTH=LOGIN`, sends
`* BAD [ALERT]` when the password was already sent, and answers
`LOGIN`/`AUTHENTICATE` with `NO [PRIVACYREQUIRED]`; POP3 drops `USER` and
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/rfcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Served by `yarilo-imap`, through `yarilo-imap-login`. Extensions marked *after l

| RFC | Title | State | Notes |
|:---|:---|:---|:---|
| [9051](https://www.rfc-editor.org/rfc/rfc9051) | IMAP4rev2 | yes | after `ENABLE IMAP4rev2`, no `RECENT` response and no `\Recent` flag; see [Recent messages](/protocols/imap#recent-messages). `LOGINDISABLED` before STARTTLS while [`auth_allow_cleartext`](/architecture/services) refuses cleartext |
| [9051](https://www.rfc-editor.org/rfc/rfc9051) | IMAP4rev2 | yes | after `ENABLE IMAP4rev2`, no `RECENT` response and no `\Recent` flag; see [Recent messages](/protocols/imap#recent-messages). `LOGINDISABLED` before STARTTLS while [`auth_allow_cleartext`](/architecture/services) refuses cleartext, and always under `ssl_mode: required` |
| [3501](https://www.rfc-editor.org/rfc/rfc3501) | IMAP4rev1 | yes | `\Recent` held by the first session that selects the folder; see [Recent messages](/protocols/imap#recent-messages) |
| [2180](https://www.rfc-editor.org/rfc/rfc2180) | IMAP4 multi-accessed mailbox practice | partial | a `COPY` that meets a message another session expunged copies nothing and answers `NO [EXPUNGEISSUED]` (§4.4.1) |
| [2177](https://www.rfc-editor.org/rfc/rfc2177) | IDLE | yes | |
Expand Down Expand Up @@ -88,7 +88,7 @@ Served by `yarilo-submission`, through `yarilo-submission-login`, which answers
|:---|:---|:---|:---|
| [5321](https://www.rfc-editor.org/rfc/rfc5321) | SMTP | yes | |
| [6409](https://www.rfc-editor.org/rfc/rfc6409) | Message submission | yes | relayed to an external MTA |
| [3207](https://www.rfc-editor.org/rfc/rfc3207) | STARTTLS | yes | port 587 |
| [3207](https://www.rfc-editor.org/rfc/rfc3207) | STARTTLS | yes | port 587; with [`ssl_mode: required`](/architecture/services), `530 5.7.0` to every command but EHLO, STARTTLS, NOOP and QUIT before TLS (§4) |
| [8314](https://www.rfc-editor.org/rfc/rfc8314) | Implicit TLS | yes | port 465 |
| [4954](https://www.rfc-editor.org/rfc/rfc4954) | AUTH | yes | |
| [6152](https://www.rfc-editor.org/rfc/rfc6152) | 8BITMIME | yes | |
Expand Down
Loading