将连接器设置为在 Microsoft 365 或 Office 365 与您自己的电子邮件服务器之间路由邮件Set up connectors to route mail between Microsoft 365 or Office 365 and your own email servers

本主题可帮助您设置在以下两种情况下需要使用的连接器:This topic helps you set up the connectors you need for the following two scenarios:

  • 您具有自己的电子邮件服务器(也称为本地服务器),且您订阅到 Exchange Online Protection (EOP) 以使用电子邮件保护服务。You have your own email servers (also called on-premises servers), and you subscribe to Exchange Online Protection (EOP) for email protection services.

  • 您在两个位置有(或有意拥有)邮箱;Microsoft 365 或 Office 365 中的一些邮箱,并且其中一些邮箱位于组织的电子邮件服务器(也称为本地服务器)上。You have (or intend to have) mailboxes in two places; some mailboxes in Microsoft 365 or Office 365, and some of your mailboxes are on your organization email servers (also called on-premises servers).

备注

在开始之前,请确保在我的特定方案中检查我自己的电子邮件服务器Before you get started, make sure you check on your specific scenario in I have my own email servers.

Microsoft 365 或 Office 365 连接器如何与我的本地电子邮件服务器配合使用?How do Microsoft 365 or Office 365 connectors work with my on-premises email servers?

如果您有 EOP 和自己的电子邮件服务器,或者某些邮箱位于 Microsoft 365 或 Office 365 中,并且某些邮箱位于您的电子邮件服务器上,请设置连接器以启用双向邮件流。If you have EOP and your own email servers, or if some of your mailboxes are in Microsoft 365 or Office 365 and some are on your email servers, set up connectors to enable mail flow in both directions. 可以在 Microsoft 365 或 Office 365 与任何基于 SMTP 的电子邮件服务器(如 Exchange 或第三方电子邮件服务器)之间启用邮件流。You can enable mail flow between Microsoft 365 or Office 365 and any SMTP-based email server, such as Exchange or a third-party email server.

下图显示了 Microsoft 365 或 Office 365 中的连接器(包括 Exchange Online 或 EOP)如何与您自己的电子邮件服务器配合使用。The diagram below shows how connectors in Microsoft 365 or Office 365 (including Exchange Online or EOP) work with your own email servers.

Microsoft 365 或 Office 365 与您的电子邮件服务器之间的连接器

在此示例中,John 和 Bob 均为您公司的员工。In this example, John and Bob are both employees at your company. John 有一个邮箱位于您所管理的电子邮件服务器上,而 Bob 有一个邮箱位于 Office 365 中。John has a mailbox on an email server that you manage, and Bob has a mailbox in Office 365. John 和小明使用 Internet 电子邮件帐户与 Sun 交换邮件:John and Bob both exchange mail with Sun, a customer with an Internet email account:

  • 如果电子邮件是在 John 和 Bob 之间发送,则需要连接器。When email is sent between John and Bob, connectors are needed.

  • 如果电子邮件是在 John 和 Sun 之间发送,则需要连接器(所有 Internet 电子邮件都通过 Office 365 进行传递)。When email is sent between John and Sun, connectors are needed. (All Internet email is delivered via Office 365.)

  • 如果电子邮件是在 Bob 和 Sun 之间发送,则不需要连接器。When email is sent between Bob and Sun, no connector is needed.

如果你有自己的电子邮件服务器和 Microsoft 365 或 Office 365,则必须在 Microsoft 365 或 Office 365 中设置连接器。If you have your own email servers and Microsoft 365 or Office 365, you must set up connectors in Microsoft 365 or Office 365. 如果不带连接器,电子邮件将不会在 Microsoft 365 或 Office 365 与您组织的电子邮件服务器之间流动。Without connectors, email will not flow between Microsoft 365 or Office 365 and your organization's email servers.

连接器如何在 Microsoft 365 或 Office 365 和我自己的电子邮件服务器之间路由邮件?How do connectors route mail between Microsoft 365 or Office 365 and my own email server?

您需要两个连接器以在 Microsoft 365 或 Office 365 与您的电子邮件服务器之间路由电子邮件,如下所示:You need two connectors to route email between Microsoft 365 or Office 365 and your email servers, as follows:

  • 从 Microsoft 365 或 Office 365 到您自己的电子邮件服务器的连接器A connector from Microsoft 365 or Office 365 to your own email server

当您将 Microsoft 365 或 Office 365 设置为代表组织接受所有电子邮件时,您会将域的 MX (邮件交换)记录指向 Microsoft 365 或 Office 365。When you set up Microsoft 365 or Office 365 to accept all email on behalf of your organization, you will point your domain's MX (mail exchange) record to Microsoft 365 or Office 365. 若要准备此邮件传递方案,必须设置备用服务器(称为 "智能主机"),以便 Microsoft 365 或 Office 365 可以将电子邮件发送到您组织的电子邮件服务器(也称为 "本地服务器")。To prepare for this mail delivery scenario, you must set up an alternative server (called a "smart host") so that Microsoft 365 or Office 365 can send email to your organization's email server (also called "on-premises server"). 若要完成此方案,您可能需要将您的电子邮件服务器配置为接受由 Microsoft 365 或 Office 365 传递的邮件。To complete the scenario, you might need to configure your email server to accept messages delivered by Microsoft 365 or Office 365.

  • 从你自己的电子邮件服务器到 Microsoft 365 或 Office 365 的连接器A connector from your own email server to Microsoft 365 or Office 365

设置此连接器后,Microsoft 365 或 Office 365 接受来自组织的电子邮件服务器的邮件,并代表您将邮件发送给收件人。When this connector is set up, Microsoft 365 or Office 365 accepts messages from your organization's email server and send the messages to recipients on your behalf. 此收件人可以是你的组织在 Microsoft 365 或 Office 365 中的邮箱,也可以是 Internet 上的收件人。This recipient could be a mailbox for your organization in Microsoft 365 or Office 365, or it could be a recipient on the Internet. 若要完成此方案,您还需要将您的电子邮件服务器配置为直接向 Microsoft 365 或 Office 365 发送电子邮件。To complete this scenario, you'll also need to configure your email server to send email messages directly to Microsoft 365 or Office 365.

此连接器使 Microsoft 365 或 Office 365 能够扫描电子邮件中的垃圾邮件和恶意软件,并强制实施法规遵从性要求(如运行数据丢失防护策略)。This connector enables Microsoft 365 or Office 365 to scan your email for spam and malware, and to enforce compliance requirements such as running data loss prevention policies. 当您的电子邮件服务器直接将所有电子邮件发送到 Microsoft 365 或 Office 365 时,您自己的 IP 地址将被阻止添加到垃圾邮件阻止列表中。When your email server sends all email messages directly to Microsoft 365 or Office 365, your own IP addresses are shielded from being added to a spam block list. 若要完成此方案,您可能需要将您的电子邮件服务器配置为将邮件发送到 Microsoft 365 或 Office 365。To complete the scenario, you might need to configure your email server to send messages to Microsoft 365 or Office 365.

备注

此方案需要两个连接器:一个从 Microsoft 365 或 Office 365 到您的邮件服务器,另一个用于管理相反方向的邮件流。This scenario requires two connectors: one from Microsoft 365 or Office 365 to your mail servers, and one to manage mail flow in the opposite direction. 在开始之前,请确保您拥有所需的全部信息,然后按照说明继续操作,设置并验证这两个连接器。Before you start, make sure you have all the information you need, and continue with the instructions until you have set up and validated both connectors.

步骤概述Overview of the steps

下面概述了步骤:Here is an overview of the steps:

  • 完成您的电子邮件服务器环境所需满足的先决条件。Complete the prerequisites for your email server environment.

  • 第1部分:将邮件配置为从 Microsoft 365 或 Office 365 传输到您的电子邮件服务器。Part 1: Configure mail to flow from Microsoft 365 or Office 365 to your email server.

  • 第2部分:将邮件配置为从您的电子邮件服务器传递到 Microsoft 365 或 Office 365。Part 2: Configure mail to flow from your email server to Microsoft 365 or Office 365.

本地电子邮件环境的先决条件Prerequisites for your on-premises email environment

准备内部部署电子邮件服务器,以便它可以与 Microsoft 365 或 Office 365 连接。Prepare your on-premises email server so that it's ready to connect with Microsoft 365 or Office 365. 请按以下步骤操作:Follow these steps:

  1. 确保您的内部部署电子邮件服务器已设置,并且能够发送和接收 Internet (外部)电子邮件。Make sure that your on-premises email server is set up and capable of sending and receiving Internet (external) email.

  2. 检查您的本地电子邮件服务器是否已启用传输层安全性 (TLS),且是否有证书颁发机构签发(CA 签发)的有效证书。我们建议证书使用者名称中包含与您组织中的主要电子邮件服务器匹配的域名。如有必要,请购买符合此描述的 CA 签发的数字证书。Check that your on-premises email server has Transport Layer Security (TLS) enabled, with a valid certification authority-signed (CA-signed) certificate. We recommend that the certificate subject name includes the domain name that matches the primary email server in your organization. Buy a CA-signed digital certificate that matches this description, if necessary.

  3. 如果要使用证书在 Microsoft 365 或 Office 365 与您的电子邮件服务器之间进行安全通信,请更新您的电子邮件服务器用来接收邮件的连接器。If you want to use certificates for secure communication between Microsoft 365 or Office 365 and your email server, update the connector your email server uses to receive mail. 当 Microsoft 365 或 Office 365 尝试与您的服务器建立连接时,此连接器必须识别正确的证书。This connector must recognize the right certificate when Microsoft 365 or Office 365 attempts a connection with your server. 如果你使用的是 Exchange,请参阅Receive Connectors,了解详细信息。If you're using Exchange, see Receive Connectors for more information. 在边缘传输服务器或客户端访问服务器 (CAS) 上,配置接收连接器的默认证书。On the Edge Transport Server or Client Access Server (CAS), configure the default certificate for the Receive connector. 在 Exchange 命令行管理程序中更新set-receiveconnector cmdlet 上的TlsCertificateName参数。Update the TlsCertificateName parameter on the Set-ReceiveConnector cmdlet in the Exchange Management Shell. 若要了解如何在本地 Exchange 组织中打开 Exchange 命令行管理程序,请参阅 Open the Exchange Management ShellTo learn how to open the Exchange Management Shell in your on-premises Exchange organization, see Open the Exchange Management Shell.

  4. 记下面向外部的电子邮件服务器的名称或 IP 地址。Make a note of the name or IP address of your external-facing email server. 如果您使用的是 Exchange,则这是将从 Microsoft 365 或 Office 365 接收电子邮件的边缘传输服务器或 CA 的完全限定的域名(FQDN)。If you're using Exchange, this is the Fully Qualified Domain Name (FQDN) of your Edge Transport server or CAS that will receive email from Microsoft 365 or Office 365.

  5. 打开防火墙上的端口25,以便 Microsoft 365 或 Office 365 可以连接到您的电子邮件服务器。Open port 25 on your firewall so that Microsoft 365 or Office 365 can connect to your email servers.

  6. 请确保您的防火墙接受来自所有 Microsoft 365 或 Office 365 IP 地址的连接。Make sure that your firewall accepts connections from all Microsoft 365 or Office 365 IP addresses. 有关已发布的 IP 地址范围,请参阅Exchange ONLINE IP 地址和 urlSee Exchange Online IP addresses and URLs for the published IP address ranges.

  7. 记下您组织中的每个域的电子邮件地址。您稍后将需要使用此地址来测试您的连接器能否正常运行。Make a note of an email address for each domain in your organization. You'll need this later to test that your connector is working properly.

第1部分:将邮件配置为从 Microsoft 365 或 Office 365 传递到本地电子邮件服务器Part 1: Configure mail to flow from Microsoft 365 or Office 365 to your on-premises email server

此部分包含以下三个步骤:There are three steps for this:

  1. 配置 Microsoft 365 或 Office 365 环境。Configure your Microsoft 365 or Office 365 environment.

  2. 设置从 Microsoft 365 或 Office 365 到你的电子邮件服务器的连接器。Set up a connector from Microsoft 365 or Office 365 to your email server.

  3. 将 MX 记录更改为将邮件流从 Internet 重定向到 Microsoft 365 或 Office 365。Change your MX record to redirect your mail flow from the Internet to Microsoft 365 or Office 365.

1. 配置 Microsoft 365 或 Office 365 环境1. Configure your Microsoft 365 or Office 365 environment

请确保已在 Microsoft 365 或 Office 365 中完成了以下操作:Make sure you have completed the following in Microsoft 365 or Office 365:

  1. 要设置连接器,则必须先获得分配的权限,然后才能开始设置。To set up connectors, you need permissions assigned before you can begin. 若要查看所需的权限,请参阅 EOP 主题中的功能权限主题中的 "Microsoft 365 和 Office 365 连接器" 条目。To check what permissions you need, see the Microsoft 365 and Office 365 connectors entry in the Feature permissions in EOP topic.

  2. 如果您希望 EOP 或 Exchange Online 将电子邮件从您的电子邮件服务器中继到互联网,则:If you want EOP or Exchange Online to relay email from your email servers to the Internet, either:

    • 使用在 Microsoft 365 或 Office 365 中配置了与接受域匹配的使用者名称的证书。Use a certificate configured with a subject name that matches an accepted domain in Microsoft 365 or Office 365. 我们建议证书的公用名或者使用者备用名称与您组织的主 SMTP 域相匹配。We recommend that your certificate's common name or subject alternative name matches the primary SMTP domain for your organization. 有关详细信息,请参阅本地电子邮件环境的先决条件For details, see Prerequisites for your on-premises email environment.

    或者 --OR-

    • 确保所有组织发件人域和子域在 Microsoft 365 或 Office 365 中配置为接受域。Make sure that all your organization sender domains and subdomains are configured as accepted domains in Microsoft 365 or Office 365.

    For more information about defining accepted domains, see Manage accepted domains in Exchange Online and Enable mail flow for subdomains in Exchange Online.For more information about defining accepted domains, see Manage accepted domains in Exchange Online and Enable mail flow for subdomains in Exchange Online.

  3. 决定是否要使用邮件流规则(也称为传输规则)或域名将邮件从 Microsoft 365 或 Office 365 传递到您的电子邮件服务器。Decide whether you want to use mail flow rules (also known as transport rules) or domain names to deliver mail from Microsoft 365 or Office 365 to your email servers. 大多数企业选择为所有接受域传递邮件。Most businesses choose to deliver mail for all accepted domains. 有关详细信息,请参阅方案:条件邮件路由在 Exchange Online 中For more information, see Scenario: Conditional mail routing in Exchange Online.

备注

您可以按照Exchange Online 中的邮件流规则操作中所述设置邮件流规则。You can set up mail flow rules as described in Mail flow rule actions in Exchange Online. 例如,如果当前您的邮件通过通讯组列表定向到多个站点,则您可能需要将邮件流规则与连接器结合使用。For example, you might want to use mail flow rules with connectors if your mail is currently directed via distribution lists to multiple sites.

2. 设置从 Microsoft 365 或 Office 365 到你的电子邮件服务器的连接器2. Set up a connector from Microsoft 365 or Office 365 to your email server

若要在 Microsoft 365 或 Office 365 中创建连接器,请单击 "管理员",然后单击 " exchange " 转到 exchange 管理中心。To create a connector in Microsoft 365 or Office 365, click Admin, and then click Exchange to go to the Exchange admin center. Next, click mail flow, and click connectors.Next, click mail flow, and click connectors.

如果你的组织已有连接器,那么系统会在此处列出。If any connectors already exist for your organization, you can see them listed here.

Microsoft 365 或 Office 365 与电子邮件服务器之间的连接器的示例

在设置新的连接器之前,检查此处列出的您组织已有的任何连接器。Before you set up a new connector, check any connectors that are already listed here for your organization. 例如,如果您运行过 Exchange混合配置向导,则在 Microsoft 365 或 Office 365 和 Exchange Server 之间传递邮件的连接器将设置并在此处列出。For example, if you ran the Exchange Hybrid Configuration wizard, connectors that deliver mail between Microsoft 365 or Office 365 and Exchange Server will be set up already and listed here. 虽然您无需重新设置这些连接器,但可以视需要在此处进行编辑。You don't need to set them up again, but you can edit them here if you need to. 如果您不打算使用混合配置向导,或者如果您运行的是 Exchange Server 2007 或更低版本,或者是非 Microsoft SMTP 邮件服务器,请使用此向导设置连接器。If you don't plan to use the hybrid configuration wizard, or if you're running Exchange Server 2007 or earlier, or if you're running a non-Microsoft SMTP mail server, set up connectors using the wizard.

To start the wizard, click the plus symbol +. On the first screen, choose the options that are depicted in the following screenshot:To start the wizard, click the plus symbol +. On the first screen, choose the options that are depicted in the following screenshot:

Microsoft 365 或 Office 365 到你的电子邮件服务器

Click Next, and follow the instructions in the wizard.Click Next, and follow the instructions in the wizard. Click the Help or Learn More links if you need more information.Click the Help or Learn More links if you need more information. The wizard will guide you through setup.The wizard will guide you through setup. At the end, make sure your connector validates.At the end, make sure your connector validates. 如果连接器未验证,请双击显示的消息以获取详细信息,并参阅验证连接器以帮助解决问题。If the connector does not validate, double-click the message displayed to get more information, and see Validate connectors for help resolving issues.

3. 将 MX 记录更改为将邮件流从 Internet 重定向到 Microsoft 365 或 Office 3653. Change your MX record to redirect your mail flow from the Internet to Microsoft 365 or Office 365

若要将电子邮件流重定向到 Microsoft 365 或 Office 365,请更改您的域的 MX (邮件交换)记录。To redirect email flow to Microsoft 365 or Office 365, change the MX (mail exchange) record for your domain. 有关如何执行此操作的说明,请参阅通过添加 MX 记录路由电子邮件For instructions on how to do this, see Add MX record to route email.

第2部分:将邮件配置为从您的电子邮件服务器传递到 Microsoft 365 或 Office 365Part 2: Configure mail to flow from your email server to Microsoft 365 or Office 365

此部分包含以下两个步骤:There are two steps for this:

  1. 设置从您的电子邮件服务器到 Microsoft 365 或 Office 365 的连接器。Set up a connector from your email server to Microsoft 365 or Office 365.

  2. 将您的电子邮件服务器设置为通过 Microsoft 365 或 Office 365 将邮件中继到 Internet。Set up your email server to relay mail to the Internet via Microsoft 365 or Office 365.

完成第 2 部分后,请按照结尾的说明检查您的配置能否正常运行。Once you have completed Part 2, see the instructions at the end to check that your configuration works.

1. 设置从你的电子邮件服务器到 Microsoft 365 或 Office 365 的连接器1. Set up a connector from your email server to Microsoft 365 or Office 365

若要在 Microsoft 365 或 Office 365 中创建连接器,请单击 "管理",再单击 " exchange",然后转到 Exchange 管理中心。To create a connector in Microsoft 365 or Office 365, click Admin, click Exchange, and then to go to the Exchange admin center. Next, click mail flow, and click connectors.Next, click mail flow, and click connectors. If any connectors already exist for your organization, you can see them listed here.If any connectors already exist for your organization, you can see them listed here.

To start the wizard, click the plus symbol +. On the first screen, choose the options that are depicted in the following screenshot:To start the wizard, click the plus symbol +. On the first screen, choose the options that are depicted in the following screenshot:

选择从您组织的电子邮件服务器到 Microsoft 365 或 Office 365

Click Next, and follow the instructions in the wizard. Click the Help or Learn More links if you need more information. In particular, see Identifying email from your email server for help configuring certificate or IP address settings for this connector. The wizard will guide you through setup. At the end, save your connector.Click Next, and follow the instructions in the wizard. Click the Help or Learn More links if you need more information. In particular, see Identifying email from your email server for help configuring certificate or IP address settings for this connector. The wizard will guide you through setup. At the end, save your connector.

2. 将您的电子邮件服务器设置为通过 Microsoft 365 或 Office 365 将邮件中继到 Internet2. Set up your email server to relay mail to the Internet via Microsoft 365 or Office 365

接下来,必须准备电子邮件服务器以将邮件发送到 Microsoft 365 或 Office 365。Next, you must prepare your email server to send mail to Microsoft 365 or Office 365. 这样可以通过 Microsoft 365 或 Office 365 从你的电子邮件服务器到 Internet 的邮件流。This enables mail flow from your email servers to the Internet via Microsoft 365 or Office 365.

如果你的本地电子邮件环境为 Microsoft Exchange,则创建使用智能主机路由向 Microsoft 365 或 Office 365 发送邮件的发送连接器。If your on-premises email environment is Microsoft Exchange, you create a Send connector that uses smart host routing to send messages to Microsoft 365 or Office 365. 有关详细信息,请参阅创建发送连接器以通过智能主机路由出站电子邮件For more information, see Create a Send connector to route outbound email through a smart host.

若要在 Exchange Server 中创建发送连接器,请在 Exchange 命令行管理程序中使用以下语法。To create the Send connector in Exchange Server, use the following syntax in the Exchange Management Shell. 若要了解如何在本地 Exchange 组织中打开 Exchange 命令行管理程序,请参阅 Open the Exchange Management ShellTo learn how to open the Exchange Management Shell in your on-premises Exchange organization, see Open the Exchange Management Shell.

备注

在下面的过程中, _CloudServicesMailEnabled_参数在 Exchange 2013 或更高版本中可用。In the following procedures, the CloudServicesMailEnabled parameter is available in Exchange 2013 or later.

New-SendConnector -Name <DescriptiveName> -AddressSpaces * -CloudServicesMailEnabled $true -Fqdn <CertificateHostNameValue> -RequireTLS $true -DNSRoutingEnabled $false -SmartHosts <YourDomain>-com.mail.protection.outlook.com -TlsAuthLevel CertificateValidation

本示例新建具有下列属性的发送连接器:This example creates a new Send Connector with the following properties:

  • 名称:我的公司到 Office 365Name: My company to Office 365

  • FQDN: mail.contoso.comFQDN: mail.contoso.com

  • SmartHosts: contoso-com.mail.protection.outlook.comSmartHosts: contoso-com.mail.protection.outlook.com

New-SendConnector -Name "My company to Office 365" -AddressSpaces * -CloudServicesMailEnabled $true -Fqdn mail.contoso.com -RequireTLS $true -DNSRoutingEnabled $false -SmartHosts contoso-com.mail.protection.outlook.com -TlsAuthLevel CertificateValidation

我如何知道连接器会正确路由我的组织邮件?How do I know connectors will route my organization mail correctly?

如果您已正确完成所有这些步骤,则所有邮件现在都将通过 Microsoft 365 或 Office 365 进行传递。If you have completed all of these steps correctly, all your mail will now be delivered via Microsoft 365 or Office 365.

若要检查能否传递邮件,请执行以下操作:To check that this is working:

  1. 将电子邮件从您的电子邮件服务器上的邮箱发送到外部(Internet)收件人。Send email from a mailbox on your email server to an external (Internet) recipient.

  2. 将一封电子邮件从 Internet 邮箱发送到您电子邮件服务器上的邮箱。Send email from an Internet mailbox to a mailbox on your email server.

确保这两封电子邮件都能收到。Make sure both emails are received.

更改 Microsoft 365 或 Office 365 正在为邮件流使用的连接器Change a connector that Microsoft 365 or Office 365 is using for mail flow

若要更改连接器的设置,请选择您要编辑的连接器,然后选择下面屏幕截图中所示的编辑图标。To change settings for a connector, select the connector you want to edit and then select the edit icon as shown in the following screen shot.

显示已选择连接器和已突出显示编辑(铅笔)图标的屏幕快照。

连接器向导将打开,并且您可以更改现有的连接器设置。The connector wizard opens, and you can make changes to the existing connector settings. 更改连接器设置时,Microsoft 365 或 Office 365 将继续使用邮件流的现有连接器设置。While you change the connector settings, Microsoft 365 or Office 365 continues to use the existing connector settings for mail flow. 当您保存对连接器的更改时,Microsoft 365 或 Office 365 将使用新设置启动。When you save changes to the connector, Microsoft 365 or Office 365 starts using the new settings.

如果我有多个适用于同一种情况的连接器,会发生什么情况?What happens when I have multiple connectors for the same scenario?

大多数客户不需要设置连接器。Most customers don't need to set up connectors. 对于那些已设置的用户,通常每个单邮件流方向有一个连接器就足够了。For those that do, one connector per single mail flow direction is usually enough. 但您也可以为单个邮件流方向创建多个连接器,例如从 Microsoft 365 或 Office 365 发送到您的电子邮件服务器(也称为本地服务器)。But you can also create multiple connectors for a single mail flow direction, such as from Microsoft 365 or Office 365 to your email server (also called on-premises server).

如果有多个连接器,解决邮件流问题的第一步是了解 Microsoft 365 或 Office 365 正在使用的连接器。When there are multiple connectors, the first step to resolving mail flow issues is to know which connector Microsoft 365 or Office 365 is using. Microsoft 365 或 Office 365 使用以下顺序选择要应用于电子邮件的连接器:Microsoft 365 or Office 365 uses the following order to choose a connector to apply to an email:

  1. 使用完全匹配收件人的域的连接器。Use a connector that exactly matches the recipient domain.

  2. 使用适用于所有接受域的连接器。Use a connector that applies to all accepted domains.

  3. 使用通配符模式匹配。例如,*.contoso.com 将匹配 mail.contoso.com 和 sales.contoso.com。Use wildcard pattern matching. For example, *.contoso.com would match mail.contoso.com as well as sales.contoso.com.

Microsoft 365 或 Office 365 如何应用多个连接器的示例Example of how Microsoft 365 or Office 365 applies multiple connectors

In this example, your organization has four accepted domains, contoso.com, sales.contoso.com, fabrikam.com, and contoso.onmicrosoft.com.In this example, your organization has four accepted domains, contoso.com, sales.contoso.com, fabrikam.com, and contoso.onmicrosoft.com. 您有三个连接器配置为从 Microsoft 365 或 Office 365 配置为您组织的电子邮件服务器。You have three connectors configured from Microsoft 365 or Office 365 to your organization's email server. For this example, these connectors are known as Connector 1, Connector 2, and Connector 3.For this example, these connectors are known as Connector 1, Connector 2, and Connector 3.

连接器 1 针对您组织中的所有接受域进行配置。下面的屏幕快照显示了连接器向导屏幕,您可以在其中定义连接器适用于哪些域。在这种情况下,所选的设置是 适用于发送到您组织的所有接受域的电子邮件Connector 1 is configured for all accepted domains in your organization. The following screen shot shows the connectors wizard screen where you define which domains the connector applies to. In this case, the setting chosen is For email messages sent to all accepted domains in your organization.

显示连接器向导页面:何时要使用此连接器?选中第二个选项。此选项是:针对发送到您组织中的所有接受域的电子邮件。

连接器 2 专为您的公司的 Contoso.com 域而设置。下面的屏幕快照显示了连接器向导屏幕,您可以在其中定义连接器适用于哪些域。在这种情况下,所选的设置是 仅当电子邮件发送到这些域时。对于 连接器 2 ,指定为您公司的 Contoso.com 域。Connector 2 is set up specifically for your company domain Contoso.com. The following screen shot shows the connectors wizard screen where you define which domains the connector applies to. In this case, the setting chosen is Only when email messages are sent to these domains. For Connector 2, your company domain Contoso.com is specified.

显示连接器向导页面:何时要使用此连接器?选中第三个选项。此选项是:仅当电子邮件发送到这些域时。已添加 Contoso.com 域。

连接器 3 也通过使用选项 仅当电子邮件发送到这些域时进行设置。但是,连接器并不使用特定域 Contoso.com,而是使用通配符:*.Contoso.com,如下面的屏幕中所示。Connector 3 is also set up by using the option Only when email messages are sent to these domains. But, instead of the specific domain Contoso.com, the connector uses a wildcard: *.Contoso.com as shown in the following screen shot.

显示连接器向导页面:何时要使用此连接器?选中第三个选项。此选项是:仅当电子邮件发送到这些域时。指定的域包含通配符。添加了 *.contoso.com。

对于从 Microsoft 365 或 Office 365 发送给您的电子邮件服务器上的邮箱的每封电子邮件,Microsoft 365 或 Office 365 可能会选择最特定的连接器。For each email sent from Microsoft 365 or Office 365 to mailboxes on your email server, Microsoft 365 or Office 365 selects the most specific connector possible. 对于发送至以下邮箱中的电子邮件:For email sent to:

  • john@fabrikam.com、Microsoft 365 或 Office 365 选择连接器 1john@fabrikam.com, Microsoft 365 or Office 365 selects Connector 1.

  • john@contoso.com、Microsoft 365 或 Office 365 选择连接器 2john@contoso.com, Microsoft 365 or Office 365 selects Connector 2.

  • john@sales.contoso.com、Microsoft 365 或 Office 365 选择连接器 3john@sales.contoso.com, Microsoft 365 or Office 365 selects Connector 3.

另请参阅See also

使用连接器配置邮件流Configure mail flow using connectors

Exchange Online、Microsoft 365 和 Office 365 的邮件流最佳做法(概述)Mail flow best practices for Exchange Online, Microsoft 365, and Office 365 (overview)

验证连接器Validate connectors

将连接器设置为确保与合作伙伴组织之间实现安全的邮件流Set up connectors for secure mail flow with a partner organization