sendmail错误Connection refused by [127.0.0.1]的解决
来源:互联网 发布:地平线3优化差 编辑:程序博客网 时间:2024/05/18 01:23
centos5.1的sendmail不能在本地用户之间发生邮件,但之前是可以的,输入:
netstat -an|grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
unix 2 [ ] DGRAM 7325
ps -ef|grep sendmail
root 3158 1 0 Mar31 ? 00:00:00 sendmail: accepting connections
smmsp 3166 1 0 Mar31 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 6490 6443 0 08:28 pts/1 00:00:00 grep sendmail
说明sendmail运行正常,那么问题出在哪里呢,查看mail日志,/var/log/maillog,重复出现:
Mar 31 04:02:36 www sendmail[6602]: m2UK2DeH006602: from=root, size=2028, class=0, nrcpts=1, msgi/
d=<200803302002.m2UK2DeH006602@www.ky-sch.cn>, relay=root@localhost
Mar 31 04:02:36 www sendmail[6602]: m2UK2DeH006602: to=root, ctladdr=root (0/0), delay=00:00:23, /
xdelay=00:00:00, mailer=relay, pri=32028, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred/
: Connection refused by [127.0.0.1]
据此可以得出问题所在:连接被本地[127.0.0.1]拒绝,这就应该是本地的localhost出了问题,查看/etc/hosts,看到有这么一行:
127.0.0.1 www.ky-sch.cn www localhost.localdomain localhost
删除www.ky-sch.cn、www,然后重起sendmail:
service sendmail restart
问题解决。
提示:linux下的多个网络程序需要使用/etc/hosts文件,如没有必要,不要修改这个文件。
- sendmail错误Connection refused by [127.0.0.1]的解决
- Connection refused by [127.0.0.1]
- Connection refused by [127.0.0.1]
- redhat senmail Connection refused by [127.0.0.1] 的解决方法
- Android中127.0.0.1/localhost connection refused的错误
- Connection refused问题的解决
- Sendmail日志中经常有这样的提示:Connection refused
- telnet: connect to address 127.0.0.1: Connection refused解决
- jboss客户端调用ejb“Connection refused to host: 127.0.0.1”问题的解决
- 解决telnet: connect to address 127.0.0.1: Connection refused的错误信息(2)
- Connection refused错误
- connection refused 解决
- MongoDB启动时出现errno:111 Connection refused错误的解决
- MongoDB启动时出现errno:111 Connection refused错误的解决
- 连mysql MESSAGE: java.net.ConnectException: Connection refused错误解决
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- 哈哈
- Tcpdump命令的使用
- centos中mysql重置密码
- 解决在Windows下Cygwin Command not found的问题
- 备忘录:Java/JSP中使用JDBC连接SQL Server 2005
- sendmail错误Connection refused by [127.0.0.1]的解决
- make: *** No targets specified and no makefile found. Stop.
- c++关键字struct和class的区别
- spring里使用JDBC(一)原始方式
- 网页爬虫程序开发经验谈
- GNU C扩展(一)
- word中如何实现多级编号的自动生成?
- GNU C 扩展(二)
- algorithem 入门经典