Stalwart is now a drop-in replacement for Microsoft Exchange

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

For more than twenty years, “the mail server” in most companies meant Microsoft Exchange, and “the mail client” meant Outlook. Today we are releasing Stalwart 1.2.0, and with it Stalwart becomes a drop-in replacement for Microsoft Exchange.

二十多年来,在大多数公司中,“邮件服务器”意味着 Microsoft Exchange,“邮件客户端”则意味着 Outlook。今天我们发布了 Stalwart 1.2.0,随之而来的是,Stalwart 成为了 Microsoft Exchange 的直接替代品。

Stalwart now implements the protocols that Exchange clients speak: MAPI over HTTP, Exchange Web Services (EWS), Exchange ActiveSync and Autodiscover. Outlook, Apple Mail and the mail apps on phones and tablets connect to Stalwart as they would to an Exchange server, with mail, calendars, contacts, tasks and notes in one account. Users type their email address and password, Autodiscover does the rest, and they keep working in the client they already know.

Stalwart 现在实现了 Exchange 客户端所使用的协议:MAPI over HTTP、Exchange Web Services (EWS)、Exchange ActiveSync 和 Autodiscover。Outlook、Apple Mail 以及手机和平板电脑上的邮件应用程序可以像连接 Exchange 服务器一样连接到 Stalwart,并将邮件、日历、联系人、任务和笔记整合在一个账户中。用户只需输入电子邮件地址和密码,自动发现(Autodiscover)功能便会完成其余工作,用户可以继续在他们熟悉的客户端中工作。

Exchange support is part of the open source Community edition, under the AGPL.

Exchange 支持是开源社区版的一部分,采用 AGPL 协议。

Before going into what Stalwart now does, it is worth looking at where self-hosted Exchange stands today, because it explains why so many organisations are looking for a way out.

在深入探讨 Stalwart 的功能之前,有必要先看看自托管 Exchange 的现状,因为这解释了为什么这么多组织都在寻找出路。

Microsoft has not announced the end of Exchange Server. On paper, on-premises Exchange still exists. In practice, every road Microsoft is building leads to Exchange Online:

微软尚未宣布 Exchange Server 的终结。从纸面上看,本地部署的 Exchange 依然存在。但在实践中,微软铺设的每一条路都指向了 Exchange Online:

None of these steps forces anyone to move on its own. Together, they leave an Exchange administrator with a shrinking set of choices: keep running a server that will not grow, or move the organisation’s mail into Microsoft’s cloud.

这些步骤中的任何一个都不会强迫任何人迁移。但综合起来,它们留给 Exchange 管理员的选择越来越少:要么继续运行一台无法扩展的服务器,要么将组织的邮件迁移到微软的云端。

For many organisations the second option is not acceptable. Email is the record of a company’s contracts, negotiations, legal advice, HR matters and customer data. Placing it with a US provider means placing it within reach of US law, including the CLOUD Act, which allows US authorities to compel American providers to hand over data they control wherever it is stored. Public administrations, healthcare providers, law firms, defence contractors and many European companies cannot accept that, or no longer want to. Data sovereignty means that you decide where your data lives, under which jurisdiction, and who can read it. A mail service in someone else’s cloud cannot offer that, and an on-premises server whose vendor is steering its customers toward that cloud offers less of it every year.

对于许多组织来说,第二个选项是不可接受的。电子邮件记录着公司的合同、谈判、法律建议、人力资源事务和客户数据。将其托管给美国供应商意味着它将处于美国法律的管辖范围内,包括《云法案》(CLOUD Act),该法案允许美国当局强制美国供应商交出其控制下的数据,无论数据存储在何处。公共行政部门、医疗保健提供商、律师事务所、国防承包商和许多欧洲公司无法接受这一点,或者不再愿意接受。数据主权意味着由你决定数据存储在哪里、受哪个司法管辖区管辖,以及谁可以读取它。托管在他人云端的邮件服务无法提供这一点,而如果其供应商正引导客户转向该云端,那么本地服务器所能提供的数据主权也会逐年减少。

The obstacle to leaving Exchange has rarely been the server. It has been the client.

离开 Exchange 的障碍很少在于服务器,而在于客户端。

Many people have spent their whole working life in Outlook. They have years of muscle memory in it: their folder layout, their rules, their calendar views, their shared mailboxes, the way they book meeting rooms. Many organisations also have workflows built around it, such as delegated calendars managed by an assistant. Replacing Exchange with a standard IMAP and CalDAV server has always meant telling every one of those users to switch to a different mail client, or to reconfigure Outlook into a reduced IMAP mode where calendars and contacts no longer sync. For a migration project, that is often where the plan dies.

许多人整个职业生涯都在使用 Outlook。他们对它有着多年的肌肉记忆:文件夹布局、规则、日历视图、共享邮箱以及预订会议室的方式。许多组织还围绕它构建了工作流程,例如由助理管理的委托日历。用标准的 IMAP 和 CalDAV 服务器替换 Exchange,总是意味着要告诉每一位用户切换到不同的邮件客户端,或者将 Outlook 重新配置为功能受限的 IMAP 模式,在这种模式下,日历和联系人将不再同步。对于迁移项目来说,这往往是计划失败的地方。

With Stalwart 1.2.0 the users do not need to change anything. The administrator moves the mailboxes and points the DNS records at Stalwart, and users connect with the same Outlook they used before.

有了 Stalwart 1.2.0,用户无需更改任何内容。管理员只需迁移邮箱并将 DNS 记录指向 Stalwart,用户即可使用他们之前使用的同一个 Outlook 进行连接。

Stalwart implements the following Microsoft protocols, all served on the same HTTPS port as JMAP and the WebUI:

Stalwart 实现了以下 Microsoft 协议,所有这些协议都通过与 JMAP 和 WebUI 相同的 HTTPS 端口提供服务:

That set of protocols is what the following clients use to talk to an Exchange server, and they can connect to Stalwart the same way:

这套协议正是以下客户端与 Exchange 服务器通信所使用的协议,它们可以以同样的方式连接到 Stalwart:

The Exchange protocols are not a separate silo inside Stalwart. They are another door into the same accounts. A message filed in Outlook is in the same mailbox an IMAP or JMAP client sees, a meeting accepted on a phone appears in the calendar that CalDAV clients read, and a contact added in Apple Contacts shows up in the CardDAV address book. A user can keep Outlook on the office desktop, the native mail app on a phone and a JMAP webmail in the browser, all on one account.

Exchange 协议在 Stalwart 内部并非一个独立的孤岛。它们是通往同一账户的另一扇门。在 Outlook 中归档的邮件与 IMAP 或 JMAP 客户端看到的位于同一个邮箱中,在手机上接受的会议会出现在 CalDAV 客户端读取的日历中,而在 Apple 联系人中添加的联系人也会出现在 CardDAV 地址簿中。用户可以在办公桌面的 Outlook、手机上的原生邮件应用以及浏览器中的 JMAP 网络邮件上同时使用同一个账户。

Rules created in Outlook’s Rules and Alerts are stored on the server as mail rules, which run as Sieve when the message is delivered. They apply when Outlook is closed and whatever client the user opens next. Delegates and folder permissions set in Outlook become regular Stalwart shares, so they apply to every protocol. Shared mailboxes open automatically in Outlook from group membership, as they do with Exchange.

在 Outlook 的“规则和警报”中创建的规则会作为邮件规则存储在服务器上,并在邮件送达时以 Sieve 脚本运行。无论 Outlook 是否关闭,或者用户接下来打开什么客户端,这些规则都会生效。在 Outlook 中设置的委托和文件夹权限会成为常规的 Stalwart 共享,因此它们适用于所有协议。共享邮箱会根据组成员身份在 Outlook 中自动打开,就像在 Exchange 中一样。

Not every part of an Exchange deployment has a counterpart. Stalwart does not offer public folders, archive mailboxes, mobile device management, RPC over HTTP (Outlook 2010 and earlier) or NTLM and Kerberos sign-in: clients authenticate with a password, an app password or OAuth. The Exchange documentation covers configuration, DNS and Autodiscover, each family of clients, and the differences from Exchange that administrators should know about before a migration.

并非 Exchange 部署的每个部分都有对应的功能。Stalwart 不提供公用文件夹、存档邮箱、移动设备管理、RPC over HTTP(Outlook 2010 及更早版本)或 NTLM 和 Kerberos 登录:客户端通过密码、应用密码或 OAuth 进行身份验证。Exchange 文档涵盖了配置、DNS 和自动发现、各类客户端,以及管理员在迁移前应了解的与 Exchange 的差异。

One Outlook is missing from the list above: the new Outlook for Windows, the one that Windows now installs by default and that classic Outlook keeps offering through a toggle in its title bar.

上述列表中缺少了一个 Outlook 版本:新的 Windows 版 Outlook,即 Windows 现在默认安装的版本,也是经典版 Outlook 在标题栏中通过切换开关不断推荐的版本。

The new Outlook does not work with Stalwart, and it does not work with any self-hosted server, Exchange included. It is built to work through Microsoft’s cloud. Microsoft does not support on-premises Exchange accounts in it at all.

新版 Outlook 无法与 Stalwart 配合使用,也无法与任何自托管服务器(包括 Exchange)配合使用。它是为通过微软云端工作而构建的。微软根本不支持在其中使用本地部署的 Exchange 账户。

The new Outlook does accept IMAP accounts, and that might look like a way around the problem. It is not. When an IMAP account is added to the new Outlook, the connection to the mail server is not made from the user’s computer. As heise and c’t reported in November 2023, the new Outlook sends the IMAP server name, the user name and the password to Microsoft, and Microsoft’s cloud connects to the mail server on the user’s behalf. Every message then passes through Microsoft’s infrastructure on its way to the screen. Microsoft does not only see the mail; it holds the password to the mailbox.

新版 Outlook 确实接受 IMAP 账户,这看起来似乎是一种变通方法。但事实并非如此。当向新版 Outlook 添加 IMAP 账户时,与邮件服务器的连接并非从用户的计算机发起。正如 heise 和 c’t 在 2023 年 11 月报道的那样,新版 Outlook 会将 IMAP 服务器名称、用户名和密码发送给微软,然后由微软的云端代表用户连接到邮件服务器。随后,每一封邮件在到达屏幕之前都会经过微软的基础设施。微软不仅能看到邮件,还掌握着邮箱的密码。

For an organisation that runs its own mail server to keep its data under its own control, this defeats the purpose of the whole exercise. We advise against using the new Outlook with any self-hosted email deployment, whether it runs Stalwart or anything else. Users who see the “Try th

对于一个运行自己的邮件服务器以保持数据自主控制的组织来说,这违背了整个行动的目的。我们建议不要在任何自托管电子邮件部署中使用新版 Outlook,无论其运行的是 Stalwart 还是其他任何系统。看到“尝试(Try th”的用户……