unix启动过程中sendmail长时间等待问题解决

作者:tacy lee

今天在配置confluence邮件功能的时候,启动sendmail竟然需要很长时间,网上查了查,有很多人碰到类似问题,但是一般都是关掉sendmail服务或者关掉dns了事,咱们现在要用它,自然不能关掉了事,dns也不能关,关了服务器没法解析域名

毫无疑问,sendmail去做dns lookup,并且无法lookup到域名,在等待解析超时!

resolv里面也指定了nameserver,应该能正常做dns解析了,既然他无法解析域名,自然这是个本地域名,难道是hosts里面的问题,查看了一下hosts文件:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
192.168.1.28    rdosrv

好像也没发现啥不对的,他在解析啥呢,看看log去,找到/var/log/maillog(也可能在messages),看到如下内容:

Dec 11 14:25:01 rdosrv sendmail[22710]: starting daemon (8.13.8): SMTP+queueing@01:00:00
Dec 11 14:25:01 rdosrv sm-msp-queue[22717]: My unqualified host name (rdosrv) unknown; sleeping for retry
Dec 11 14:28:08 rdosrv sendmail[22803]: My unqualified host name (rdosrv) unknown; sleeping for retry
Dec 11 14:35:23 rdosrv sendmail[22944]: My unqualified host name (rdosrv) unknown; sleeping for retry
Dec 11 14:35:57 rdosrv sendmail[22962]: My unqualified host name (rdosrv) unknown; sleeping for retry
Dec 11 14:36:54 rdosrv sendmail[22979]: My unqualified host name (rdosrv) unknown; sleeping for retry

竟然是无法解析rdosrv,有点意思,直接去ping rdosrv自然是没问题,突然想到好像FQDN里面规定域名必须用"."结尾,难道是hosts里面少了一个".",尝试修改hosts文件:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
192.168.1.28    rdosrv.     rdosrv

启动sendmail,刷一下就启动了,呵呵

回头想想,问题其实很简单,但是在网上却没找到什么好的方案,说明都挺懒得,能绕都绕过去了.

del.icio.us Tags: ,,

posted on 2007-12-11 15:58 tacy lee 阅读(2529) 评论(4)  编辑  收藏

评论

# re: unix启动过程中sendmail长时间等待问题解决 2008-04-13 16:16 xiao

非常感谢!解决我的问题!
  回复  更多评论   

# re: unix启动过程中sendmail长时间等待问题解决 2008-04-13 18:45 tacy lee

有帮助就好 呵呵  回复  更多评论   

# re: unix启动过程中sendmail长时间等待问题解决[未登录] 2009-12-21 22:36 hehe

不是懒 是会的 都不写到网上
呵呵  回复  更多评论   

# re: unix启动过程中sendmail长时间等待问题解决[未登录] 2012-08-21 17:57 清风

及时雨啊,谢谢  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: