CentOS8使用sendmail发邮件报错
Diagnostic-Code: X-Postfix; Host or domain name not found. Name
service error for name=test.com type=A: Host not found
确认步骤
1.hosts文件正确配置
2.ping test.com正常
3.telnet test.com 25 正常
4.修改main.cf的inet_protocols = ipv4
这时候还是提示域名找不到,最后在官网文档看到个东西
smtp_host_lookup = native
把这个配置加到/etc/postfix/main.cf末尾就可以了
本文档介绍了在CentOS8系统中使用sendmail发送邮件时遇到的'Host or domain name not found'错误。作者通过一系列排查步骤,如检查hosts文件、ping测试和telnet连接,发现仍无法解决问题。最终,在官方文档中找到了解决方案,即在/etc/postfix/main.cf文件末尾添加'smtp_host_lookup=native'配置,成功解决了域名查找失败的问题。
1万+

被折叠的 条评论
为什么被折叠?



