Chinaunix

标题: sendmail 将 localhost.localdomain 解析出外部的IP 的问题 [打印本页]

作者: whoping    时间: 2009-02-18 18:06
标题: sendmail 将 localhost.localdomain 解析出外部的IP 的问题
最近由于其他问题, 修改公司内部dns 使用了电信的DNS 作为我们的转发器。
今天发现我的redhat 8 的sendmail 工作不正常了
我的sendmail 的机器的dns 使用我们内部的dns 。
我在sendmial 的服务器上 , nslookup 查询 localhost.localdomain ,
得到: 61.140.3.66  的结果。 看来还真有人注册了这个? 还是电信干的好事?
我的想法是sendmail 中继到localhost.localdomain 的解析到其他IP 而不是127.0.0.1
是sendmail 的默认工作机制, 它首先查询了我的DNS 。
我尝试修改了 service.switch , nsswitch.conf 都不能解决,
暂时关闭内部dns 的转发器, 这样 sendmail 服务器不能解析localhost.localdomain, sendmail才恢复工作 。

请教各位, 有什么方法在使用电信的DNS 做转发器, 而sendmail 认为localhost.localdomain  是127.0.0.1 ?
谢谢!  
日志如下:

Feb 18 10:58:23 fax sendmail[27238]: n1I2wMHC027238: to=FaxMaster, delay=00:00:0
1, xdelay=00:00:01, mailer=relay, pri=30185, relay=localhost.localdomain. [61.14
0.3.66], dsn=4.0.0, stat=Deferred: Connection refused by localhost.localdomain.
Feb 18 10:58:23 fax sendmail[27268]: n1I2wN90027268: from=fax, size=12630, class
=0, nrcpts=1, msgid=<200902180258.n1I2wN90027268@fax.cctcfax.com>, relay=uucp@lo
calhost
Feb 18 10:58:24 fax sendmail[27268]: n1I2wN90027268: to=faxrcv4mkt@cctcb.com,
delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30168, relay=localhost.local
domain. [61.140.3.66],
dsn=4.0.0, stat=Deferred: Connection refused by localhost
.localdomain.
Feb 18 11:03:15 fax sendmail[27339]: n1I33F4x027339: from=fax, size=172, class=0
, nrcpts=1, msgid=<200902180303.n1I33F4x027339@fax.ccfax.com>, relay=uucp@loca
lhost
Feb 18 11:03:17 fax sendmail[27339]: n1I33F4x027339: to=FaxMaster, delay=00:00:0
2, xdelay=00:00:02, mailer=relay, pri=30172, relay=localhost.localdomain. [59.37
.71.85], dsn=4.0.0, stat=Deferred: Connection refused by localhost.localdomain.

[ 本帖最后由 whoping 于 2009-2-18 18:08 编辑 ]
作者: gfedcba    时间: 2009-02-18 22:45
我的localhost.localdomain也是不能解析的,也是出现一个ip:220.250.64.19。
作者: whoping    时间: 2009-02-19 09:52
楼上的兄弟, 你的maillog会看到和我的一样, 邮件不能发出去吗?
感觉应该不少人会使用电信的DNS , 不应该会出现这样的问题。
如果sendmail 的第一步relay 使用 localhost, 而不是localhost.localdomain
的话,就能绕开此问题。
作者: xmbbx    时间: 2009-02-19 11:20
把localhost.localdomain配在/etc/hosts看看
作者: whoping    时间: 2009-02-19 15:59
localhost.localdomain 已经在/etc/hosts ,
我在sendmail 机器上 ping  localhost.localdomain是127.0.0.1 正确应答的。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2