为 SMTP 横幅检查配置反向查找区域Configure reverse lookup zones for an SMTP banner check

本文介绍如何使用 Azure DNS 中的反向区域,以及如何为 SMTP 横幅检查创建反向 DNS (PTR) 记录。This article describes how to use a reverse zone in Azure DNS and create a Reverse DNS (PTR) record for SMTP Banner Check.

症状Symptom

如果在 Azure 中托管 SMTP 服务器,则自远程邮件服务器收发邮件时,可能收到以下错误消息:If you host an SMTP server in Azure, you may receive the following error message when send or receive a message from remote mail servers:

554: 无 PTR 记录554: No PTR Record

解决方案Solution

对于 Azure 中的虚拟 IP 地址,将在 Azure 拥有的域区域(而不是自定义域区域)中创建反向记录。For a virtual IP address in Azure, the reverse records are created in Azure owned domain zones, not custom domain zones.

若要在 Azure 拥有区域配置 PTR 记录,请使用 PublicIpAddress 资源的 -ReverseFqdn 属性。To configure PTR records in Azure owned zones, use the -ReverseFqdn property on the PublicIpAddress resource. 有关详细信息,请参阅为 Azure 中托管的服务配置反向 DNSFor more information, see Configure reverse DNS for services hosted in Azure.

配置 PTR 记录时,请确保 IP 地址和反向 FQDN 为订阅所有。When you configure the PTR records, make sure that the IP address and the reverse FQDN are owned by the subscription. 如果尝试设置不属于订阅的反向 FQDN,将收到以下错误消息:If you try to set a reverse FQDN that does not belong to the subscription, you receive the following error message:

Set-AzPublicIpAddress : ReverseFqdn mail.contoso.com that PublicIPAddress ip01 is trying to use does not belong to subscription <Subscription ID>. One of the following conditions need to be met to establish ownership: 

1) ReverseFqdn matches fqdn of any public ip resource under the subscription; 
2) ReverseFqdn resolves to the fqdn (through CName records chain) of any public ip resource under the subscription; 
3) It resolves to the ip address (through CName and A records chain) of a static public ip resource under the subscription. 

如果将 SMTP 横幅手动更改为与默认反向 FQDN 相匹配,远程邮件服务器仍可能失败,因为它可能期望 SMTP 横幅主机与域的 MX 记录相匹配。If you manually change your SMTP banner to match our default reverse FQDN, the remote mail server can still fail because it may expect the SMTP banner host to match the MX record for the domain.