sendmail hostname unknown; sleeping for retry

作者:reistlin 发布时间:February 11, 2011 分类:自由点击

linux

问题:

sendmail 日志文件 /var/log/maillog 报错:

Feb 10 05:59:01 reistlin sendmail[2079]: My unqualified host name (reistlin) unknown; sleeping for retry
Feb 10 06:00:01 reistlin sendmail[2079]: unable to qualify my own domain name (reistlin) -- using short name

解决:

/etc/hosts 文件中,主机名需要增加 Fully Qualified Domain Name (FQDN)

编辑 /etc/hosts 文件,增加一个 FQDN,比如:reistlin.localdomain(最后一行)

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
::1             localhost6.localdomain6 localhost6
192.168.0.1     reistlin.localdomain    reistlin

最后,重新启动 sendmail:

[root@reistlin ~]# /etc/init.d/sendmail restart

测试:

[root@reistlin ~]# sendmail -v
Recipient names must be specified

执行 sendmail -v 如果立即显示 Recipient names must be specified 即表示没有 FQDN 解析问题了。反之,如果无任何显示,则表示 sendmail 无法正确解析 FQDN,请求 sleeping 了。

标签: linux, sendmail

评论已关闭