第 12 章 客户端、Groupware & CLI 管理:#pUsers

设置 Outlook for Windows:邮件通过 IMAP,日历 & 联系人通过 CalDav Synchronizer

Microsoft Outlook for Windows 通过 IMAP(收件)和 SMTP(发件)连接 nextxch。这适用于经典版 Outlook(Microsoft 365 Apps、Outlook 2016 至 2024)以及新版 Outlook for Windows。在经典版 Outlook 中,免费的开源插件 CalDav Synchronizer 还可通过 CalDAV 和 CardDAV 同步日历、联系人和任务。本页列出确切的服务器设置,并清楚说明为什么 "Exchange" 账户类型在 Outlook for Windows 中无法使用。

运维提示与架构说明

用户名始终是完整的电子邮件地址。如果账户启用了双重身份验证 (2FA),IMAP、SMTP 和 CalDAV/CardDAV 会拒绝普通密码:请在 Webmail 中打开“设置 -> 2FA、通行密钥与密码 -> 设备与应用密码”,为 Outlook 创建一个专用的应用密码,并在 Outlook 或 CalDav Synchronizer 要求输入密码的地方填入该密码。笔记本电脑停用时,只需吊销这一个应用密码。

Outlook(经典版和新版 Outlook)的服务器设置

主机名是您的 nextxch 安装的服务器名称,例如 mail.company.com。对于托管在 mail.nextxch.com 上的邮箱,请输入 mail.nextxch.com。

参考 / 配置
Account type:           IMAP   (not "Exchange", not "Exchange 2013 or earlier")
Email address:          anna.weber@company.com
User name:              anna.weber@company.com   (always the full address)
Password:               account password, App Password if 2FA is enabled

Incoming (IMAP):        mail.company.com   Port 993   Encryption: SSL/TLS
Outgoing (SMTP):        mail.company.com   Port 465   Encryption: SSL/TLS
  or alternatively:     mail.company.com   Port 587   Encryption: STARTTLS
SMTP authentication:    required, same credentials as incoming
Secure Password Authentication (SPA): off

Hosted mailboxes:       mail.nextxch.com instead of mail.company.com

1. 经典版 Outlook:设置 IMAP 账户

如果 autodiscover.<您的域> 指向该服务器,Outlook 通常会自动建议 IMAP 设置,因为 nextxch 会以 IMAP 和 SMTP 设置响应 Autodiscover。否则,只需几个步骤即可手动设置账户。

参考 / 配置
1. File -> Add Account -> enter the email address
2. Expand "Advanced options" -> "Let me set up my account manually" -> Connect
3. Choose account type "IMAP"
4. Incoming mail:  server mail.company.com · port 993 · encryption SSL/TLS
   Outgoing mail:  server mail.company.com · port 465 · encryption SSL/TLS
                   (or port 587 · encryption STARTTLS)
   Do NOT enable "Require logon using Secure Password Authentication (SPA)"
5. Enter the password or App Password -> Connect -> Done

Change later: File -> Account Settings -> Account Settings -> select account -> Repair / Change

2. 新版 Outlook for Windows:添加 IMAP 账户

数据主权方面的重要提示:据 Microsoft 称,新版 Outlook 会通过 Microsoft 云同步其他服务商的账户。凭据和邮箱内容的副本会在 Microsoft 服务器上处理。如果您希望避免这种情况,请使用经典版 Outlook、Thunderbird 或 nextxch Webmail。

参考 / 配置
1. Settings (gear) -> Accounts -> Email accounts -> Add account
2. Enter the email address -> Continue
3. Choose "IMAP" as the provider and show the advanced settings
4. IMAP incoming server:  mail.company.com · port 993 · SSL/TLS
   SMTP outgoing server:  mail.company.com · port 465 · SSL/TLS (or 587 · STARTTLS)
   User name:             full email address (for IMAP and SMTP)
   Password:              account password or App Password (with 2FA)
5. Continue -> confirm sync with the Microsoft Cloud -> Done

Calendar and contacts: not available for IMAP accounts in the new Outlook

3. 在经典 Outlook 中通过 CalDav Synchronizer 使用日历、联系人 & 任务

CalDav Synchronizer 是一款适用于经典版 Outlook for Windows 的免费开源加载项 (AGPL),可从 caldavsynchronizer.org 获取。它是独立项目,与 nextxch 无关联。请分别为日历、联系人和任务各创建一个同步配置文件。

参考 / 配置
1. Install CalDav Synchronizer and restart Outlook
2. Ribbon "CalDav Synchronizer" -> "Synchronization Profiles" -> "+" (add profile)
3. Choose profile type "Generic CalDAV/CardDAV"
4. Select the Outlook folder, e.g. "Calendar (This computer only)" of the IMAP account
   or a new, empty folder
5. Enter the DAV URL:
     Calendar:  https://mail.company.com/dav/calendars/anna.weber@company.com/default/
     Contacts:  https://mail.company.com/dav/addressbooks/anna.weber@company.com/default/
     Tasks:     https://mail.company.com/dav/calendars/anna.weber@company.com/tasks/
   Discovery: https://mail.company.com/.well-known/caldav
              https://mail.company.com/.well-known/carddav
6. Username:      anna.weber@company.com
   Password:      account password or App Password (with 2FA)
   Email address: anna.weber@company.com
7. "Test or discover settings" -> confirm connection and resource
8. Synchronization mode: "Outlook <-> Server (Two-Way)" · interval e.g. 5 minutes
9. Save with OK; repeat steps 2 to 8 for contacts and tasks

4. 将 Outlook for Windows 配置为 Exchange 账户(MAPI over HTTP)

Outlook for Windows 通过 MAPI over HTTP 连接 Exchange 类型的账户。nextxch 自 1.4 版起支持此方式:Outlook 通过 Autodiscover 设置账户,并同步邮件、日历、联系人、任务和通讯簿,无需加载项。Apple 邮件、日历和通讯录以及 Outlook for Mac 使用 EWS。新版 Outlook for Windows 仅通过 Microsoft 服务连接 Exchange 账户;在那里仍可使用 IMAP。

参考 / 配置
Client                              Mail                    Calendar, contacts & tasks
----------------------------------  ----------------------  ---------------------------------------
Outlook for Windows (classic)       Exchange (MAPI/HTTP)    Exchange (MAPI/HTTP)
Outlook for Windows (new)           IMAP + SMTP             not available, use Webmail
Outlook for iOS and Android         Exchange ActiveSync     Exchange ActiveSync
iPhone and iPad                     ActiveSync or IMAP      ActiveSync or CalDAV/CardDAV
Android (Gmail, Samsung, DAVx5)     ActiveSync or IMAP      ActiveSync or CalDAV/CardDAV (DAVx5)
macOS (Mail, Calendar, Contacts)    Exchange (EWS) or IMAP  Exchange (EWS) or CalDAV/CardDAV
Thunderbird (Windows/macOS/Linux)   IMAP + SMTP             CalDAV/CardDAV (built in)
Browser                             Webmail /mail/          Webmail /mail/

"Exchange" account type in Outlook for Windows: supported (MAPI over HTTP, setup via Autodiscover)
iPhone, iPad and macOS: setup profile via QR code or link, see chapter 10

设置、默认值与最佳实践

设置 / 位置 说明 默认值 生产环境最佳实践
Posteingang: IMAP, Port 993, SSL/TLS 邮件、文件夹和已读状态通过 IMAPS 传输,从第一个字节起即使用 TLS。特殊文件夹(已发送、草稿箱、已删除、垃圾邮件)由服务器通过 IMAP SPECIAL-USE 通告。 993 · SSL/TLS 请使用端口 993 和 SSL/TLS。使用 STARTTLS 的端口 143 只是可选的后备方案,必须在防火墙中单独开放。
Postausgang: SMTP, Port 465 (SSL/TLS) oder 587 (STARTTLS) 供已验证用户提交邮件。端口 465 立即加密(隐式 TLS);端口 587 以明文开始,并在身份验证前通过 STARTTLS 升级为 TLS。 465 · SSL/TLS 在 Outlook 中启用 "我的发送服务器 (SMTP) 要求验证",并使用与接收邮件相同的凭据。端口 25 仅用于服务器之间的投递。
Benutzername & App-Passwort (2FA) 所有客户端协议都使用完整的电子邮件地址登录。启用 2FA 后,IMAP、SMTP 和 DAV 将拒绝普通密码。 E-Mail-Adresse 为每台设备和每个程序分别创建应用密码(Webmail -> 设置 -> 2FA、通行密钥 & 密码),以便有针对性地吊销单个访问权限。
CalDAV-Kalender: /dav/calendars/<adresse>/default/ 邮箱的默认日历,供 CalDav Synchronizer 和其他 CalDAV 客户端使用(VEVENT,包括邀请和重复系列)。 https://<host>/dav/calendars/<adresse>/default/ 使用 CalDav Synchronizer 中的"测试或发现设置"按钮进行验证;或者,以 https://<host>/.well-known/caldav 作为发现的起点即可。
CardDAV-Kontakte: /dav/addressbooks/<adresse>/default/ 邮箱的默认通讯簿(vCard 3.0/4.0),适用于 CalDav Synchronizer、Thunderbird、macOS 和 DAVx5。 https://<host>/dav/addressbooks/<adresse>/default/ 请使用专用的 Outlook 联系人文件夹进行同步,以免混入其他账户的本地联系人。发现地址:https://<host>/.well-known/carddav。
CalDAV-Aufgaben: /dav/calendars/<adresse>/tasks/ 邮箱的任务列表 (VTODO),与 Webmail 和手机上的任务相同。 https://<host>/dav/calendars/<adresse>/tasks/ 在 CalDav Synchronizer 中创建第三个配置文件,并选择 Outlook 任务文件夹。
Neues Outlook für Windows 仅支持将 nextxch 作为 IMAP 账户收发邮件。新版 Outlook 不支持 CalDAV、CardDAV 以及 CalDav Synchronizer 等 COM 加载项。 IMAP · nur E-Mail 如果您需要在 Outlook 中使用日历和联系人,请使用经典 Outlook 搭配 CalDav Synchronizer,或使用 nextxch Webmail (/mail/)。
Kontotyp "Exchange" in Outlook für Windows Outlook for Windows(经典版、Microsoft 365、2016 至 2024)通过 MAPI over HTTP 连接 Exchange 类型的账户。nextxch 支持此方式:邮件、日历、联系人、任务、通讯簿和发送功能均无需加载项。新版 Outlook 仅通过 Microsoft 服务连接 Exchange 账户。 Unterstützt (MAPI over HTTP) 使用您的电子邮件地址添加账户;Outlook 会通过 Autodiscover 找到设置。autodiscover.<您的域> 必须指向该服务器,并且必须为该域启用 MAPI。