Skip to content

v2.4.5

Choose a tag to compare

@github-actions github-actions released this 31 Oct 14:38
· 578 commits to develop since this release
d6ac4be

A patch release of the 2.4 stable line. It brings JMAP push (EventSource and WebSocket), \Recent in IMAP, the auth policy request in full, and fixes in LMTP, Submission, the director and the backend API. The Go module path is now github.com/yarilomail/yarilo/v2, so v2.4.5 is the first release go get takes by number.

Before you upgrade

These change what an existing configuration or rollout does. Read them first.

  • Four special-use folders are made by default (#2351). A namespace owning INBOX without a mailboxes block, and a server with no namespaces (the chart default), now make Drafts, Junk, Sent and Trash, each subscribed with its special-use. Every account gets them on its next LIST, SELECT or delivery to one of them. A mailboxes block of your own replaces the set; mailboxes: {} makes none. More folders per account means more work for every quota check that counts them: on the stand, LMTP delivery with six folders per account was 13-14 % slower than with two. To keep the 2.4.4 behaviour, set mailboxes: {} on the namespace.
  • Sieve allows every extension by default under Helm (#2326). The chart's sieve.sieve_extensions is now [], as the binary's default: an empty list allows every extension the engine declares. A Helm installation that did not set its own list now accepts scripts that require editheader, enclose, enotify, extracttext, fcc, foreverypart, ihave, imapsieve, include, mailboxid, mboxmetadata, mime, regex, replace, servermetadata, spamtest, spamtestplus, special-use, vacation-seconds, virustest, vnd.yarilo.execute and vnd.yarilo.report. vnd.yarilo.execute still runs only programs in sieve_execute_bin_dir. To keep the 2.4.4 behaviour, set the list in your values.
  • Threading is on without the chart too (#2325). Docker Compose and a hand-written yarilo.yaml that leaves threading_enabled out now record conversations, as Helm installations already did. Mail delivered before the upgrade is threaded after yarilo-migrate --thread-backfill runs for the account.
  • JMAP account and container ids changed (#2353). The account id is a + base64url(login) instead of the login, and a \NoSelect container's id is N + base64url(name). A client that cached the old ids has to fetch the session again; most do so on their next start.
  • LMTP refuses an unknown recipient at RCPT (#2371, #2372). lmtp-login asks userdb (as service=lmtp) before the director and answers 550 5.1.1 itself. Before, the recipient went through a director LOOKUP and a backend connection first. A recipient without a domain is now looked up as written (#2369, #2373), so <postmaster> or <abuse> reach the account userdb names that way.
  • Submission relays each RCPT as the client sends it (#2374). A relay that refuses one recipient of three now refuses that one alone, and the other two are sent.
  • The auth policy request (#2338, #2340, #2341, #2344). The body is built from auth_policy_request_attributes (chart: components.auth.policy.request_attributes); the defaults give the same keys and values as before, except protocol, which is now sieve for ManageSieve (was managesieve). SCRAM logins go through the policy. A refusal's message reaches the client. A login from a peer in general.xclient.trusted_nets gets no policy tarpit and no auth penalty. auth_policy_log_only: true now ignores tarpits and the reject_on_fail refusal too.
  • The director takes the last silent backend of a tag out of routing (#2367). Its tag's logins get NO [UNAVAILABLE] (LMTP 451 4.4.0, JMAP 502) at once instead of waiting login_proxy_timeout on a dead pod. It stays registered and comes back with its next heartbeat.
  • The chart's default image is on Docker Hub (#2310): docker.io/0kaba0/yarilo. GHCR keeps a limited number of versions. The Compose file defaults to Docker Hub as well.
  • Config schema 17 → 18. Upgrade the chart and the image together; a binary newer than its ConfigMap names the defaulted settings in a warning at start.
  • Pull the new image onto the backend nodes before helm upgrade, and keep room for one more backend pod, as for 2.4.4. See DEPLOYMENT, "Upgrading the backend StatefulSet".

New

  • JMAP push. EventSource at /jmap/eventsource/ (#2318), and JMAP over WebSocket at /jmap/ws/ with push (RFC 8887, #2347). protocol.jmap.jmap_websocket_timeout (default 1800 s, 0 turns WebSocket off). Browser clients take a ticket with POST /jmap/ws/ticket (#2358); the chart generates the ticket key into a Secret once and keeps it. Push runs on the lock service's events (#2330); jmap_push_poll is the safety recompute interval (default 60 s, 0 turns push off).
  • JMAP Identity/set (RFC 8621 §6.3, #2356). Identities can be created, updated and deleted for any of the account's addresses.
  • JMAP header:* properties on Email/set create (#2354).
  • \Recent (#2383, #2386). A message is \Recent to the first session that selects its folder after delivery: * n RECENT, STATUS (RECENT), the flag in FETCH, SEARCH RECENT / NEW / OLD. Virtual mailboxes keep their own, and +Folder in a virtual mailbox takes the folder's.
  • fts_autoindex_max_recent_msgs (#2384). The indexer skips a folder holding more \Recent messages than the limit; 0 (the default) is no limit.
  • Auth policy templates (#2341). auth_policy_request_attributes takes the full %{...} template language with the auth request's variables. protocol.imap.imap_id_retain (default false) keeps the IMAP ID pairs for %{client_id} (#2338). New metrics yarilo_auth_policy_decisions_total, yarilo_auth_policy_errors_total, yarilo_auth_policy_tarpit_seconds_total.
  • JMAP debug line (#2349). At debug level, each request's path, capabilities and method names (never arguments).

Fixed

  • IMAP CAPABILITY names SORT and THREAD after login (#2331); both were served but never announced.
  • SELECT answers [READ-ONLY] when the ACL gives no change right (#2370).
  • Submission login EHLO lists what Submission serves: PIPELINING, ENHANCEDSTATUSCODES, CHUNKING, SIZE, LIMITS (#2332). A message over the size limit is refused before it is sent.
  • maildir: a sync between a STORE and its file renames no longer writes the old flags back (#2329); STORE into two folders of one account is 24 % faster than in 2.4.4 in the release window, as one sync pass now writes its flag changes in one index transaction. A folder rebuilt by yarctl backend folder repair is readable by its UIDs at once (#2394).
  • maildir reads that meet a concurrent COPY, STORE or EXPUNGE (#2402, #2403). A row another session's COPY appended is found instead of reported as corrupt storage, a file renamed between lookup and open is opened under its current name, and a read of a message expunged under it is counted gone, not unreadable. COPY over an expunged message answers NO [EXPUNGEISSUED] and takes back the copies it made (RFC 2180 §4.4.1).
  • STORE cost of \Recent and push (#2405, #2406, #2407). A session asks for its enabled capabilities only for a \Recent message and at most once per command, and an EMIT on an account's key reaches the lock service's Redis in one trip instead of two. With them STORE into two folders on sdbox and mdbox is within 2 % of 2.4.4.
  • Backend API: folder info / stats, quota show / recalc and message get see mail an MDA or an import left in storage (#2395); quota recalc no longer rewrites the counters to 0 with messages on disk.
  • yarctl director backends add without --vhosts adds the backend with weight 100, as its help says (#2393); it used to add it with 0, so it took no traffic.
  • Director: a user moved to another backend can log in again at once (#2364); the old session record now lives until the login closes it.
  • ACL: after a backend start, concurrent LISTs share one scan of the shared owner registry (#2385). Redis dict: iterating a path reads an index of the dict's keys instead of a SCAN of the whole db (#2390).
  • JMAP: a push disable never closes the WebSocket (#2380); jmap-login answers 404 for paths it does not serve (#2351); the dict listener accepts the jmap role, so JMAP's quota usage reaches the clone dict (#2355); identity and submission writes are announced to the login (#2357); a WebSocket stays accounted and kickable until it closes (#2346).
  • Chart: protocol.submission.client_workarounds is rendered (#2327); a canonical name under components.auth.cache fails the render instead of being dropped (#2324).
  • Mail storage (from the test work of #2316): the file index adopts a reloaded base only when its extension headers match (#2399); mdbox map and purge failures leave no partial state behind (#2399); a modseq reservation nothing journalled is no longer made (#2400); a virtual folder's rule honours fts_search_strict (#2401).

Operations

  • Test coverage is 73.25 % (Codecov, d6ac4be), reported on main (#2377, #2382, #2316). Every exported identifier in pkg/ has a doc comment, enforced by revive (#2379).
  • The Helm chart is published to GHCR as an OCI artifact on release (#2307), with Artifact Hub metadata (#2309).
  • Dependencies: go-proxyproto v0.16.0, modernc.org/sqlite 1.61.0, prometheus/procfs 0.23.0, koanf v2.4.1; the go-imap, go-smtp, go-jmap and go-sieve forks on their current pins; alpine 3.24 base refresh.