大网数据广告活动
服务器运维问答

Why Gmail's SMTP server Reverse lookup does not match

· 52CE 我爱测

I am reading about setting up SMTP server and almost all articles suggest to ensure that the SMTP server's name has a matching reverse lookup (PTR) entry in DNS. However, When I casually checked the gmail settings, none of its sm…

问题原文

原帖链接 · slayedbylucifer · CC BY-SA 3.0

I am reading about setting up SMTP server and almost all articles suggest to ensure that the SMTP server's name has a matching reverse lookup (PTR) entry in DNS. However, When I casually checked the gmail settings, none of its smtp servers have a matching reverse lookup.

$ dig +short gmail.com MX
20 alt2.gmail-smtp-in.l.google.com.
5 gmail-smtp-in.l.google.com.
40 alt4.gmail-smtp-in.l.google.com.
10 alt1.gmail-smtp-in.l.google.com.
30 alt3.gmail-smtp-in.l.google.com.


$ dig +short alt2.gmail-smtp-in.l.google.com.
64.233.168.26
$ dig +short gmail-smtp-in.l.google.com.
74.125.130.27
$ dig +short alt4.gmail-smtp-in.l.google.com.
173.194.219.26
$ dig +short alt1.gmail-smtp-in.l.google.com.
74.125.28.26
$ dig +short alt3.gmail-smtp-in.l.google.com.
74.125.201.27
$ dig -x +short 64.233.168.26


$ dig -x 64.233.168.26 +short
oj-in-f26.1e100.net.
$ dig -x 74.125.130.27 +short
sb-in-f27.1e100.net.
$ dig -x 173.194.219.26 +short
ya-in-f26.1e100.net.
$ dig -x 74.125.28.26 +short
pc-in-f26.1e100.net.
$ dig -x 74.125.201.27 +short
in-in-f27.1e100.net.

So I am bit confused. Could someone help me understand how reverse lookup is used in SMTP. Certainly I am missing this concept whle I am looking at gmail's settings.

UPDATE

After reading @Jacob's Answer, Here is what I found:

Below lines are from an email metadata that was received from gmail.com:

Received: from mail-qt0-f179.google.com (mail-qt0-f179.google.com [209.85.216.179])
    by mx0a-00273201.pphosted.com with ESMTP id 2edpusg15b-1
    (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)

The PTR records match perfectly:

$ dig +short mail-qt0-f179.google.com
209.85.216.179
$ dig -x 209.85.216.179 +short
mail-qt0-f179.google.com.

So, as I understand, I was looking at the "MX" record which is not the correct one to check for outgoing. Thanks @HBruijn for detailed explanation.

Also, I find that the email was sent from [email omitted] email address. However, the outgoing SMTP server is mail-qt0-f179.google.com which is under google.com domain (I was expecting the Outgoing SMTP server should also be in the xxxxx.gmail.com domain).

已采纳解答

原帖链接 · Jacob Evans · CC BY-SA 3.0

They do match, google (and most large providers) have an abstraction for load balancing, the destination/ip of gmail-smtp-in.l.google.com. changes depending on your requesting ip, the health of the network, the load, etc.

however the IP address has a forwarder && reverse dns (FCrDNS)

dig gmail-smtp-in.l.google.com. +short
74.125.29.26

26.29.125.74.in-addr.arpa. 15995 IN     PTR     qg-in-f26.1e100.net.

dig qg-in-f26.1e100.net. +short
74.125.29.26

However, none of this "matters" for Inbound MX Records, only sending IPs.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-11-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。