VersionDrift
Product

Stalwart Mail Server 1.1.1 → 1.2.3

4 releases · 1 breaking change · 0 security fixes · 4 advisories fixed

0security1breaking0deprecated63feature82fix

Vulnerabilities fixed by this upgrade

  • 7.5 GHSA-7hw7-gq2q-796x Unauthenticated memory exhaustion through inbound DMARC and TLS report analysis
  • 7.5 GHSA-3v65-6jq9-v3hw Unauthenticated memory exhaustion through PDF attachment text extraction
  • 6.3 GHSA-ggp6-9qpj-58hf SMTP command injection through CR/LF in a Sieve redirect address
  • 6.5 GHSA-hf56-fq2g-v9r2 Authenticated memory exhaustion through repeated hrefs in CalDAV/CardDAV multiget reports

Breaking changes

  • breaking FoundationDB: the separate stalwart-foundationdb build, its Docker image and the install.sh --fdb option are removed; the standard stalwart binary connects to FoundationDB. in 1.2.0

Security changes

None in the release notes.

Every release in between

featureDKIM: configurable RSA key size for generated keys (rsaKeySize: 2048, 3072 or 4096 bits).
featureArchiving: deleted calendar events, contacts, files and Sieve scripts are archived and can be restored, each with its own retention setting.
featureSetup wizard: "Publish MX record and receive mail here" option, so a domain that receives mail elsewhere does not get MX, SPF, DMARC and MTA-STS records for this server.
featureMTA: users can send from sub-addresses of their own addresses ([email protected]) with mustMatchSender enabled.
featureExchange: EWS folder permissions, so Outlook for Mac can view and change folder sharing.
fixJMAP:
fixConcurrent thread merges no longer swap messages between threads or leave some behind.
fixBlob/lookup reports unparseable blob ids in notFound.
fixQuota/query now applies filters, sorting and paging.
fixShareNotification/query handles after dates in the future and sorting by created.
fixThe Blob capability advertises the correct maxDataSources and maxSizeBlobSet limits.
fixDestroying an email in a shared account requires mayRemoveItems on all its mailboxes (Reported by v380).
fixMailbox/set returns the stored name when it trims whitespace.
fixWebSocket sessions answer a Close frame instead of dropping the connection.
fixClassifySpam and TroubleshootDmarc actions return an id, so stalwart-cli no longer fails with created object missing id.
fixThe session's mayCreate* flags are only true where the user has the matching create permission.
fixQuotas are only listed for the capabilities named in using.
fixExchange:
fixEWS calendar items keep AllowNewTimeProposal, IsResponseRequested and their time zones, and get the default 15 minute reminder.
fixMAPI: unsaved changes on one message handle are no longer visible through other handles.
fixMAPI: the Microsoft Remote Connectivity Analyzer Mail Store test no longer fails with ecRpcFormat.
fixMAPI: classic Outlook can accept meeting requests.
fixEWS, ActiveSync and MAPI enforce the create, update and destroy permissions of app passwords, API keys and roles (Reported by v380).
fixAuth:
fixOpen sessions end when their OAuth grant is revoked or their app password or API key expires (Reported by v380).
fixauth.failed events from OIDC, LDAP and SQL directories include the account name.
fixCalendar:
fixhideAttendees is enforced over CalDAV, EWS and MAPI (Reported by v380).
fixConcurrent creates with the same UID no longer store duplicate events or contacts.
fixWebDAV: calendar-multiget and addressbook-multiget return each resource once, so repeating an href can no longer inflate the response (Reported by Dmitry Shirokov).
fixContacts: vCard TYPE values such as INTERNET are preserved, and vCard 3.0 TYPE=PREF converts to pref.
fixMTA:
fixThe failed-RCPT auto-ban counts only the connecting client's own failures (Reported by Dmitry Shirokov).
fixEnvelope addresses that need quoting are relayed quoted, and addresses with control characters are refused.
fixLocally submitted messages with non-ASCII envelope addresses are relayed with SMTPUTF8.
fixOversized DMARC and TLS reports can no longer exhaust memory; reports above maxInboundReportEntries (100,000) are rejected (Reported by Dmitry Shirokov).
fixRegistry: #creation-id references are accepted in blobEncryptionKey, backupEncryptionKey and delegateIds.
fixStorage: RocksDB backups and restores work when the database directory is a volume mount point, as in default Docker and script installs.
fixSearch: crafted PDF attachments can no longer exhaust memory during indexing (Reported by Dmitry Shirokov).
fixArchiving: changing archivedUntil on an archived item no longer schedules a restore.
+9 more items in the release notes
featureStorage:
featureOnline 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).
featureMirrored blob store, which keeps every blob in two blob stores of any type, such as two S3 providers or S3 and a filesystem.
featureSpam filter:
featureQR codes in image attachments, inline images, data: URIs, HTML tables and Unicode block characters are decoded (#1034).
featureTenant 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.
featureWith 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.
featureMTA:
featureRelay routes authenticate with OAuth 2.0 (XOAUTH2 or OAUTHBEARER) through the new auth setting.
featureExpressions: % modulo operator, with the same precedence as * and /. (#2914).
featureJMAP:
featureThe 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).
featureMailing 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).
featureBlob downloads honour a single HTTP Range (206 with Content-Range, or 416) and carry a strong ETag checked by If-Range.
featureServer:
featureSIGHUP 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).
featureA 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.
featureTelemetry:
featuremessage-ingest.* events carry the JMAP email id (id), so a webhook consumer can fetch a new message with Email/get without an Email/query.
featureStored traces can be searched by account name, which is now indexed with the other trace keywords.
featureThe 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.
featureTLS:
featureListeners can require a client certificate issued by trusted certificate authorities, with optional revocation lists (tlsClientAuth, implicit TLS only) (#2331).
featureSMTP 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).
featureCalDAV:
featureApple's calendar-color and calendar-order properties are now the calendar's JMAP color and sortOrder.
feature{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.
featureIMAP: COMPRESS=DEFLATE (RFC 4978) compresses commands and responses for clients that ask for it.
featureExchange: 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.
fixDelivery 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
fixOutbound OAUTHBEARER authentication sends the GS2 header and key/value framing required by RFC 7628 instead of the bare token.
fixAn authenticated submission session is closed with 421 4.7.0 at its next MAIL FROM, DATA or BDAT once the account loses access.
fixSub-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.
fixDelivery 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.
fixMasked 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.
fixSieve:
fixVacation 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.
fixA 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.
fixAccounts without the emailSend permission no longer send mail through Sieve.
fixCalendar:
+71 more items in the release notes
fixMTA: in a cluster, an in-memory store error while locking a queued message now retries within seconds instead of parking the message for ten minutes.
fixIMAP:
fixIDLE no longer sends unsolicited FETCH responses for newly arrived messages, which made Thunderbird and Evolution skip messages announced by EXISTS while another command was running.
fixMailbox names and other strings containing CR or LF are sent as literals, so a shared mailbox name can no longer inject response lines into another user's session.
fixJMAP:
fix/get methods list an id requested more than once only once in list or notFound.
fixMailbox/set refuses two sibling mailboxes with the same name created or renamed in the same request.
fixEmail/set rejects with invalidPatch a keyword or mailbox pointer deeper than one level, and an update that both replaces and patches keywords or mailboxIds.
fixSieve:
fixJMAP reports invalid scripts as invalidSieve, a require of an unsupported extension is refused, invalid header names in tests no longer fail compilation, and imap4flags variable names require variables.
fixredirect keeps an empty envelope sender (MAIL FROM:<>), and reject sends a failure MDN instead of a DSN; ereject still produces a DSN. Mail rules now reject with ereject (protocol-level refusal) instead of reject.
fixCalendar: iMIP invitation and update emails now label UTC and fixed-offset times that have no TZID with their time zone.
fixExchange:
fixMAPI: Outlook in cached mode no longer shows an empty body for messages whose HTML part is larger than 32 KiB; properties over 32 KiB are now included in cached-mode downloads and FastTransfer copies.
fixEWS: folders now return the PR_ENTRYID and PR_ATTR_HIDDEN extended properties when requested, which Apple Mail needs to sync the folder list without crashing.
fixActiveSync: Find reads its search text as KQL, so iOS Mail server searches such as from:"name" OR subject:"name" find messages again.
fixActiveSync: SendMail, SmartReply and SmartForward accept a raw message/rfc822 body at every protocol version, so Outlook for iOS and Android can send mail.
fixActiveSync: refused SendMail, SmartReply and SmartForward requests, and requests refused for their body type or invalid WBXML, are logged as http.error (debug) with the command, the ActiveSync status and the reason.
fixActiveSync: a calendar Add with an empty Recurrence element is stored as a single event instead of failing with status 6, so iOS Calendar can create events again.
fixAuth: password logins on a domain served by an OpenID Connect directory now fail as invalid credentials (535 5.7.8 over SMTP) and count toward the authentication auto-ban.
fixSecurity:
fixx:AppPassword/set and x:ApiKey/set only update or delete credentials of their own type, so an app password or API key can no longer change the account password or remove its TOTP.
fixS/MIME key harvesting limits the nesting of the signed content, so a crafted signed message can no longer crash the server with a stack overflow.
fixMailbox/set requires the share right for pointer patches into shareWith, so a sharee without mayShare can no longer change a mailbox's permissions.
fixStore maintenance: a trace retention longer than the time since 2021-09-22 no longer fails the task with "Invalid id cutoff for global unindex".
fixIn-memory store: when the configured store is not available (for example Stalwart Keep was unreachable at startup), operations now fail with "not configured" and point to the startup log instead of "Operation not supported by store".
featureAdd the new permissions to the default roles. Mail rules, junk e-mail lists, calendar settings and Exchange need new permissions, which default roles created by an earlier version do not include: Add these permissions manually using the recovery administrator or restart the server once with the…
featureMicrosoft Exchange protocols for Outlook, Apple Mail, Calendar and Contacts, and ActiveSync devices (disabled by default):
featureExchange Web Services (EWS): mail, calendar, contacts, tasks, folders, sharing and delegates, free/busy, inbox rules, out of office, reminders, name resolution and distribution lists, streaming and pull notifications; schema versions Exchange 2010 SP2 to Exchange 2016 (ewsVersion).
featureMAPI over HTTP (EMSMDB and NSPI) for Outlook for Windows in online and cached mode: incremental change synchronization, offline address book, delegate access, rules and junk e-mail settings, reminders, search folders and read receipts.
featureExchange ActiveSync 14.1 and 16.1: mail, calendar, contacts, tasks and notes, folder sync, Ping, SendMail, SmartReply, SmartForward, ItemOperations, MeetingResponse, ResolveRecipients, Search, Settings and out of office.
featureAutodiscover (POX, SOAP and JSON v2) for EWS, MAPI over HTTP and ActiveSync.
featureNew x:Exchange object (enable, ewsVersion, maxRequestSize, maxDevices, maxHeartbeat, maxObjectSize; permissions sysExchangeGet and sysExchangeUpdate) and a new exchange cache size setting.
featureExchange clients share data with IMAP, JMAP, CalDAV and CardDAV: Exchange-only item properties are kept, categories are shared account-wide, and Outlook and EWS rules are stored as x:MailRule rules.
featureBasic and OAuth authentication; NTLM and Kerberos are not supported.
featureNew exchange Cargo feature (enabled by default) to build without the Exchange protocols.
featureRFC 8098 - Message Disposition Notification
featureRFC 9007 - Handling MDN with JMAP: MDN/send and MDN/parse methods, capability urn:ietf:params:jmap:mdn.
featurePer-account working hours in the new x:CalendarSettings object (permissions sysCalendarSettings*).
featureManaged in the WebUI, over JMAP or through the CalDAV calendar-availability property (RFC 7953), which generates and accepts VAVAILABILITY.
featureTime outside working hours appears as BUSY-UNAVAILABLE in iTIP free/busy and as unavailable periods in JMAP Principal/getAvailability.
featureNew shareFreeBusy calendar setting that lets users see each other's free/busy time without an explicit share, within the same tenant or across the whole server when tenants are not used. Applies to CalDAV scheduling, JMAP availability and EWS.
featureResource accounts for rooms and equipment:
featureCapacity and location
featureDelegates who manage the resource's calendar
featureAutomatic or manual booking of invitations
featureServer-side rules in the new x:MailRule object (permissions sysMailRule*), compiled together with the vacation response into one read-only Sieve script named managed.
featureConditions: sender and recipient addresses, addressed to me, subject, body, subject or body, any header, header exists, size, attachments and attachment name or type, importance, sensitivity, message type (meeting, delivery report, read receipt, automatic reply, signed, encrypted), mailing list,…
featureActions: move, copy, Trash, Junk, not junk, mark as read, keywords, redirect or forward, set importance, reply with a template, reject (authenticated senders only) and discard.
featureJunk e-mail lists: blocked senders, safe senders and safe recipients, plus delegation of meeting requests.
featureFoundationDB Rust native client:
featureNative asynchronous Rust client replaces libfdb_c.
featureSupports FoundationDB 7.1 to 8.0 and TLS, needs no client library installed on the host. Included in the standard build and Docker image.
featureCompared with the previous libfdb_c client: 4.5x to 6.9x the throughput on point reads at 256 concurrent clients and 2.1x on key scans, 5x to 7x lower median latency, about 3x lower p99 latency at equal load, and roughly half the client CPU and a quarter of the client memory per point read.
featureThe libfdb_c backend remains available with the foundationdb-c feature.
breakingFoundationDB: the separate stalwart-foundationdb build, its Docker image and the install.sh --fdb option are removed; the standard stalwart binary connects to FoundationDB.
fixOAuth: successful bearer authentication now emits auth.success.
fixMySQL: a counter update whose result is exactly zero (such as a queue quota counter that had drifted to -1) no longer fails with "LAST_INSERT_ID() did not return a value", which blocked all incoming mail.
fixSPF: unknown modifiers containing / no longer cause a permerror.
fixDNS: cached TXT lookups used for one purpose no longer make a domain's DMARC policy, DKIM keys or DKIM2 Domain Policy Record look missing.
fixMTA:
fixRCPT TO for an empty mailing list no longer fails at DATA with 503.
fixExpanding large mailing lists no longer takes quadratic time.
fixStricter validation of ENVID, ORCPT, AUTH during a transaction and repeated EHLO.
fixSMTP, IMAP, POP3 and ManageSieve writes time out when the client stops reading.
fixThe Delivery Test now handles TLS and DANE like real deliveries.
+71 more items in the release notes
See how far your stack has drifted from upstream. Release data from vendors’ own sources · feed under CC BY 4.0 · Code under AGPL-3.0 Settings Feed status