github stalwartlabs/stalwart v1.2.2

18 minutes ago

[1.2.2] - 2026-11-30

After upgrading, update the spam filter rules to version 3.0.5 or later by running a SpamFilterMaintenance task with maintenanceType set to updateRules, so the new QR code tags are scored. SMTP relay routes configured with authUsername and authSecret must have their credentials re-entered in the new auth setting after upgrading, as the old fields are not carried over.

Added

  • Storage:
    • Online backups of RocksDB and SQLite data stores, on a schedule or as a backup maintenance task, to a directory or to S3-compatible storage (write only), compressed and optionally encrypted with a SymmetricKey, with optional size or full verification (#490).
    • Mirrored blob store, which keeps every blob in two blob stores of any type, such as two S3 providers or S3 and a filesystem.
  • Spam filter:
    • QR codes in image attachments, inline images, data: URIs, HTML tables and Unicode block characters are decoded (#1034).
    • Tenant admins can list, view and delete the spam training samples of accounts in their own tenant; adding samples for other accounts stays reserved to server administrators.
    • With trustReplies enabled, an iMIP update, reply or cancellation about an event already in the recipient's calendars is kept out of Junk when it comes from an authenticated sender who is a participant of the stored event.
  • MTA:
    • Relay routes authenticate with OAuth 2.0 (XOAUTH2 or OAUTHBEARER) through the new auth setting.
    • Expressions: % modulo operator, with the same precedence as * and /. (#2914).
  • JMAP:
    • The maximum size of Identity textSignature and htmlSignature is now configurable with maxSignatureSize in the JMAP settings, and the default goes from 2 KB to 100 KB so signatures with an inline logo fit (#2478).
    • Mailing lists can be listed read-only in Principal/get and Principal/query as group principals with their address and description, without members, when the new listMailingLists sharing setting (off by default).
    • Blob downloads honour a single HTTP Range (206 with Content-Range, or 416) and carry a strong ETag checked by If-Range.
  • Server:
    • SIGHUP reloads TLS certificates and settings on the local node, so systemctl reload stalwart, docker kill -s HUP or an ACME client deploy hook can pick up new certificate files without admin credentials or a restart (#352).
    • A warning is printed at startup when STALWART_RECOVERY_ADMIN is set outside recovery mode, as a reminder that this administrator account bypasses two-factor authentication.
  • Telemetry:
    • message-ingest.* events carry the JMAP email id (id), so a webhook consumer can fetch a new message with Email/get without an Email/query.
    • Stored traces can be searched by account name, which is now indexed with the other trace keywords.
    • The log viewer (x:Log/query) filters entries by level, by event (an exact event id such as smtp.connection-start, or a family such as smtp) and by time window, and a time window stops reading the log files once it reaches entries older than its start.
  • TLS:
    • Listeners can require a client certificate issued by trusted certificate authorities, with optional revocation lists (tlsClientAuth, implicit TLS only) (#2331).
    • SMTP relay routes, PostgreSQL, MySQL and LDAP accept custom TLS settings (tlsSettings): trusted certificate authorities, revocation lists, hostname verification and a client certificate (#277, #2331, #2380).
  • CalDAV:
    • Apple's calendar-color and calendar-order properties are now the calendar's JMAP color and sortOrder.
    • {account} in the defaultDisplayName of the Calendar and AddressBook settings is replaced with the account name when the default calendar and address book are created.
  • IMAP: COMPRESS=DEFLATE (RFC 4978) compresses commands and responses for clients that ask for it.
  • Exchange: group mailboxes are available over EWS and ActiveSync. Members see a Shared Folders folder with one folder per group, holding its mail, calendars and contacts, in Apple Mail, Calendar and Contacts and on ActiveSync devices.

Fixed

  • MTA:
    • Delivery status notifications keep the message/delivery-status part 7-bit US-ASCII as RFC 3464 requires: non-ASCII diagnostic text, such as a Sieve ereject reason, is sent as an RFC 2047 encoded word
    • Outbound OAUTHBEARER authentication sends the GS2 header and key/value framing required by RFC 7628 instead of the bare token.
    • An authenticated submission session is closed with 421 4.7.0 at its next MAIL FROM, DATA or BDAT once the account loses access.
    • Sub-addressing is applied wherever a local address is looked up, as delivery already did: is_local_address is true for user+tag@ on a local domain.
    • Delivery status notifications, the Sieve reject MDN and local delivery failures report the recipient address the sender used instead of the address it was rewritten to by an alias, masked address, sub-address, catch-all.
    • Masked addresses are delivered only for the exact address that was handed out (or the same local part on an alias of its domain); the same identifier with another prefix or on another hosted domain is now refused as an unknown recipient.
  • Sieve:
    • Vacation replies and reject MDNs for mail sent to an alias, sub-address, masked address or catch-all of the account now come from that address, without the account's display name and DKIM-signed for its domain.
    • A redirect of an unauthenticated message (neither submitted nor passing DMARC) whose From address belongs to the account's own organizational domain is dropped and the message filed into the Inbox.
    • Accounts without the emailSend permission no longer send mail through Sieve.
  • Calendar:
    • An iMIP message queued for an account that was deleted before it was sent is now dropped as obsolete instead of being retried for three days.
    • The display name in the From header of iMIP messages is the CN the organizer or replying attendee has in the iTIP message, so invitations sent from an alias or role address no longer show the account owner's personal name.
  • TLS:
    • A TLS listener whose configuration fails to load at startup is no longer started without TLS, and no longer prevents the following listeners from getting theirs.
    • A certificate loaded from a file is no longer deleted from the registry when the file holds an expired certificate.
    • A certificate whose private key cannot be loaded no longer displaces a valid certificate for the same name, and no longer updates its stored expiry, issuer and names.
  • ACME: renewal scheduling and reuseKey ignore expired certificates loaded from files.
  • Autoconfig: the provider logo in the PACC document (/.well-known/user-agent-configuration.json) now has its content-type, derived from the file extension of the logo URL.
  • Spam filter:
    • SPOOF_DISPLAY_NAME no longer compares the display-name address with the envelope sender when it matches a DMARC-authenticated From.
    • The SUSPICIOUS_RECIPS similarity check compares at most the first 50 To and Cc addresses, and RCPT_IN_SUBJECT and RCPT_LOCAL_IN_SUBJECT search the first 1 KiB of the subject.
    • Pyzor queries use a connected socket and a random thread id, and only accept the reply from the Pyzor server that carries the same thread id, so spoofed UDP datagrams can no longer change Pyzor results.
  • IMAP:
    • STARTTLS is only advertised and accepted before authentication; after login it gets a tagged BAD (Reported by Hebin Lv (吕贺彬), Beijing University of Posts and Telecommunications).
    • RENAME INBOX is refused with NO [CANNOT] instead of replying OK without moving anything (Reported by Hebin Lv (吕贺彬), Beijing University of Posts and Telecommunications).
    • IDLE reports changes that arrived while the session was between commands as soon as it starts, and repeats once an EXISTS that was sent inside another command's response.
    • STORE and APPEND reject the \Recent flag with a tagged BAD instead of storing it, as RFC 3501 requires (Reported by Hebin Lv (吕贺彬), Beijing University of Posts and Telecommunications).
    • SEARCH HEADER Message-ID (and In-Reply-To, References, Resent-Message-ID) finds messages when the value includes the angle brackets, and so does the JMAP header filter (Reported by Hebin Lv (吕贺彬), Beijing University of Posts and Telecommunications).
  • IMAP, JMAP, Sieve, Exchange: mailbox names containing control characters, such as a line break, are refused when a mailbox is created or renamed over IMAP, JMAP, Sieve fileinto :create, EWS, ActiveSync or MAPI.
  • IMAP, POP3, ManageSieve, SMTP: after an account change that leaves its permissions unchanged, an open session renews its access token once and keeps it.
  • Registry:
    • Inline secret keys containing a line break or other control character are rejected.
    • Domains and addresses under the special-use TLDs example, invalid and alt and the DN42 overlay TLD dn42 are accepted.
    • Tenant names are unique, so two tenants can no longer share a name and show up as the same entry in tenant pickers.
  • JMAP:
    • EmailSubmission/set refuses with cannotUnsend to cancel a submission already delivered to one of its recipients, and removes the queued message again when the submission record cannot be saved.
    • Identities created automatically for an account without a description get an empty name instead of the account login.
    • Mailbox/get returns shareWith when properties is null, urn:ietf:params:jmap:mail:share is listed in the session capabilities, and shareWith is null for a mailbox, calendar or address book that is not shared.
    • Creating an EmailSubmission requires the emailSend permission (Reported by Vince Boekestijn).
    • A push subscription's emailPush requires jmapEmailGet and stops when the account loses it, and a member removed from a group stops receiving the group's pushes (Reported by Vince Boekestijn).
    • Calendar/changes and AddressBook/changes list both the old and the new default after onSuccessSetIsDefault, and AddressBook/set reports isDefault on both.
    • CalendarEventNotification/set, ShareNotification/set, VacationResponse/set, ShareNotification/get and the x: registry methods report ids in a format the server does not use as notFound instead of leaving them out.
    • The session state is the same on every cluster node and across restarts, so clients behind a load balancer no longer refetch the session on each node switch.
    • sentAt and header:Date:asDate are null for a message whose Date header holds an out-of-range day, time or year (including a day past the end of the month).
    • x:Log/query with limit 0 returns no ids without reading the log files, instead of scanning every log file and returning all ids.
  • Cluster: push subscriptions created or renewed at runtime are no longer registered and delivered by nodes without the pushNotifications task.
  • Exchange:
    • MAPI: requests with Content-Type: application/octet-stream are accepted, so the Microsoft Remote Connectivity Analyzer address book test no longer fails with Invalid Header.
    • EWS: FindItem, GetItem, SyncFolderItems, ExecuteSearch, FindConversation and GetConversationItems read message headers in batches instead of one store read per message, making listings with the Default shape several times faster.
    • MAPI: Outlook in Cached Exchange Mode now removes calendar events and contacts deleted from another client without an Update Folder, and calendar and address book folders report their item count instead of 0.
    • EWS, ActiveSync, MAPI, NSPI, OAB and Autodiscover hide the data types whose JMAP read permission the app password, API key or role lacks, as they already did for OAuth scopes (Reported by Vince Boekestijn).
    • A renamed default calendar or address book keeps its name in Outlook, Apple Calendar and on ActiveSync devices instead of showing as Calendar or Contacts; an untouched default keeps the standard name.
    • EWS: an authenticated GET or HEAD on /EWS/Exchange.asmx now answers with a service page instead of 405, so Outlook for Mac can add the account.
    • EWS: FindItem with a QueryString (AQS) now searches the folder's full-text index instead of returning every item, and /EWS/Services.wsdl with its schemas is served again as Exchange does, for DavMail setups that point at the WSDL.
    • ActiveSync: a new Ping ends the same device's previous Ping, as Exchange does, so an iPhone no longer fills the account's concurrent request limit with its own Pings and blocks sending.
    • MAPI: folders created or renamed from another client now reach Outlook in Cached Exchange Mode without a restart, through hierarchy row notifications carrying the parent folder's new hierarchy revision.
    • MAPI: the NSPI GetAddressBookUrl request returns the address book URL with ?MailboxId=, the same URL Autodiscover advertises, as Exchange does.
    • MAPI: the NSPI GetMailboxUrl request returns the mailbox URL with ?MailboxId=, taken from the server DN as Exchange does.
    • MAPI: a message saved without a body reports PidTagNativeBody 0 (undefined) instead of plain text, recipients keep their order across a save when To, Cc and Bcc are interleaved, and RopReadRecipients on a handle opened before the message had recipients answers ecNotFound instead of rows without columns.
    • MAPI: folders created at the top of the mailbox or deleted from another client now appear and disappear in Outlook in Cached Exchange Mode without a restart, through hierarchy row added and row deleted notifications.
    • MAPI: a message saved with only a rich text (RTF) body reports PidTagNativeBody 2 (RTF) and PidTagRtfInSync true instead of plain text, and Outlook in Cached Exchange Mode receives its body as RTF; opaque S/MIME messages report PidTagNativeBody 0, as Exchange does.
    • EWS, ActiveSync, MAPI: a task folder created under Tasks before the account has a task list is now placed under the new default task list instead of the top of the mailbox, so a hierarchy sync rooted at Tasks reports it.
    • ActiveSync: a task recurrence whose Start is before 1601 (such as 0001-01-01, an unset .NET date) is refused with Sync status 6 instead of being accepted.
    • MAPI: a draft resaved with a new rich text (RTF) body no longer keeps its previous plain text or HTML body.
    • MAPI: forward and delegate rule recipients read back with their reserved byte set to 0, as Exchange 2010 and later return them.
    • MAPI: PidTagBodyContentLocation and PidTagBodyContentId are sent as the Content-Location and Content-ID of the message body part and read back from it, so they survive submission and delivery as on Exchange.
  • WebDAV: sync-collection, expand-property and principal-match reports require the same per-collection permission as PROPFIND (Reported by Vince Boekestijn).
  • HTTP:
    • The permissive CORS policy allows the Cache-Control request header, in OPTIONS preflights as well as in regular responses, so browser JMAP clients that send it pass the preflight.
    • The management API reads a request body only for the login and calendar RSVP endpoints, limited to 64 KiB, instead of buffering up to 1 MiB for any POST under /api before authentication.
  • Listeners: a [::] listener also accepts IPv4 clients on FreeBSD, and on Linux hosts with net.ipv6.bindv6only=1.
  • Search:
    • PostgreSQL and MySQL: negated searches (IMAP SEARCH NOT, JMAP NOT filters) now also match messages that lack the searched field, such as NOT FROM x on a message without a From header or NOT HEADER X-Foo bar on a message without that header.
    • PostgreSQL: exact header searches, such as a lookup by Message-ID, use the header index instead of reading every message of the account.
    • PostgreSQL: at startup, search table indexes are only created when missing.
    • PostgreSQL and Elasticsearch: From, To, Cc and Bcc searches match part of an address.
  • Auth:
    • Authentication errors no longer log the presented credential: an undecodable bearer token, an undecodable Basic value or the value sent with an unsupported mechanism is left out of the event.
    • The OAuth token endpoint answers invalid_grant for an authorization or device code that does not have the format the server issues, without looking it up.
    • A superseded OAuth refresh token is accepted as a retry of a lost refresh response only within 60 seconds of the rotation; presented later, it is treated as reuse and the grant is revoked.
    • Removing a passkey revokes the account's OAuth grants, as a password change does.
    • Plaintext ({PLAIN}, {CLEAR} or no scheme), salted SHA ({SSHA}, {SSHA256}, {SSHA512}) and unsalted digest ({SHA*}, {MD5}) passwords, and the OAuth PKCE challenge, are compared in constant time.
    • Client secrets issued by OAuth dynamic client registration are hashed with the configured passwordHashAlgorithm instead of always Argon2id.
    • When an OpenID Connect provider cannot be reached or answers with a server error or 429, logins fail as temporary instead of as invalid credentials.

Check binary attestation here

Don't miss a new stalwart release

NewReleases is sending notifications on new releases.