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

smtpd: warning: hostname example.com does not resolve to address 203.0.113.1

· 52CE 我爱测

One postfix instance at sub.example.com is pushing mail to example.com via LAN, which is both a mail server and a router: Internet | | 203.0.113.1 <example.com> (127.0.1.1 in /etc/hosts) 192.168.1.1 | | 192.168.1.99 <sub.example.…

问题原文

原帖链接 · anx · CC BY-SA 4.0

One postfix instance at sub.example.com is pushing mail to example.com via LAN, which is both a mail server and a router:

Internet
|
|
203.0.113.1 
<example.com> (127.0.1.1 in /etc/hosts)
192.168.1.1
|
|
192.168.1.99
<sub.example.com>

Every time a LAN mail is received, a warning message is logged:

postfix/smtpd[1337]: warning: hostname example.com does not resolve to address 203.0.113.1

However, the domain does resolve to the address, with only one A record (but no rdns):

# dig example.com
example.com.          3600   IN   A    203.0.113.1
# dig -x 203.0.113.1
..                       1   IN   PTR  new-customer.isp.example

While reverse DNS is NOT correct, that is not what the warning says, nor does it explain why it is only triggered by LAN mail. As confirmed via tcpdump, the LAN mail server EHLOs with sub.example.com - which is known to the postfix server as 192.168.1.99.

What is triggering the warning?

已采纳解答

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

Solution:

smtp_host_lookup = native

Will make the client postfix instance behave the way other mail clients on that systems would - using /etc/hosts IPs aswell - after which the target system will no longer complain about seeing the client connect from an outside IP although knowing it as 192.168.x.x.

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

资料来源与适用范围

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

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

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