LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1274|回复: 4

为什么sendmail的PO3端口110能够telnet,smtp端口25却被拒绝?

[复制链接]
发表于 2003-10-28 12:03:40 | 显示全部楼层 |阅读模式
sendmail安装好后,telnet 110端口,无论是localhost , localhost.localdomain还是dns解析的域名及ip都成功,但telnet 25端口只有在telnet localhost 25 或是localhost.localdomain 25 或是127.0.0.1 25 才成功,用它的完整机器名及它本身的ip去telnet 25端口时去出现被拒绝的情况,我怀疑是/etc/mail/access 与/etc/mail/access.db没有转换好!望给位大虾指点!!

我的主机名为test,域名为3322.org
redhat 7.3+sendmail8.11+iamp-2001a-10
我已经建好了dns解析
完整机器名: test.3322.org IP: 10.10.10.12

telnet localhost 25
telnet localhost.localdomain 25
telnet 127.0.0.1 25
都是没问题的,但是telnet具体的域名和ip的25端口时,却出现拒绝的现象,能够ping通,我已经执行过#makemap /etc/mail/access.db < /etc/mail/access

/etc/mail/access
------------------------------------------------------------
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
10.10.10.12 RELAY
10.10.10 RELAY
------------------------------------------------------------


------------------------------------------------------------
[root@test mail]# netstat -tl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:1024 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *op3 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:10000 *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 test.3322.org:domain *:* LISTEN
tcp 0 0 test:domain *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 test:smtp *:* LISTEN
tcp 0 0 test:rndc *:* LISTEN
tcp 0 0 *:https *:* LISTEN
[root@test mail]#
------------------------------------------------------------

------------------------------------------------------------
[root@test mail]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.11.6/8.11.6; Tue, 28 Oct 2003 10:55:0
ehlo localhost
250-localhost.localdomain Hello test [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
------------------------------------------------------------

------------------------------------------------------------
[root@test mail]# telnet 10.10.10.12 25
Trying 10.10.10.12...
telnet: connect to address 10.10.10.12: Connection refused
[root@test mail]#
------------------------------------------------------------

------------------------------------------------------------
[root@test mail]# telnet test.3322.org 25
Trying 10.10.10.12...
telnet: connect to address 10.10.10.12: Connection refused
[root@test mail]#
------------------------------------------------------------
发表于 2003-10-29 14:20:48 | 显示全部楼层
检查一下你的xinetd或inetd的配置文件。
发表于 2003-10-29 14:43:12 | 显示全部楼层
是sendmail本身的设置。
要找到sendmail.mc,修改以后重新生成sendmail.cf文件才可以。
发表于 2003-10-29 21:23:20 | 显示全部楼层
在sendmail.cf里面添加一段
O DaemonPortOptions=port=smtp,Addr=xxx.xxx.xxx.xxx,Name=MTA
注意上面的x代表你的ip地址,原来的文件里面只有127.0.0.1的,不是对外的!
 楼主| 发表于 2003-10-31 15:04:39 | 显示全部楼层
谢谢各位弟兄,

经过我反复测试,glue兄和wjs兄说的情况都有可能产生我所说的错误.

总结一下:
1)必须修改sendmail.mc中
O DaemonPortOptions=port=smtp,Addr=xxx.xxx.xxx.xxx,Name=MTA
127.0.0.1到0.0.0.0
2)必须成功地用m4命令将sendmail.mc编译成sendmail.cf,然后重启sendmail服务.

也许是个很菜的问题,但只要是问题总会给人启示,谢谢各位兄弟.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表