postfix本机测试本机时,telnet连接出错
2015-04-12 18:26
190 查看
正向解析、反向解析都没有问题,postfix默认端口为25
配置postfix的配置文件
先查看有没有telnet服务
配置postfix的配置文件
[root@www:/var/named]# cd /etc/postfix/ [root@www:/etc/postfix]# vim main.cf myhostname = www.crwolf.com myorigin = crwolf.com mydomain = crwolf.com mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 192.168.1.0/24, 127.0.0.0/8重启postfix,然后测试
[root@www:/etc/postfix]# service postfix restart 关闭 postfix: [确定] 启动 postfix: [确定] [root@www:/etc/postfix]# vim /etc/resolv.conf nameserver 192.168.1.9将DNS解析指向本机 [root@www:/etc/postfix]# telnet mail.crwolf.com 25 Trying 192.168.1.9... telnet: connect to address 192.168.1.9: Connection refused #连接拒绝 [root@www:/etc/postfix]# telnet localhost 25 #本地为什么可以? Trying ::1... Connected to localhost. Escape character is '^]'. 220 www.crwolf.com ESMTP Postfix检查问题
先查看有没有telnet服务
[root@www:/etc/postfix]# cd [root@www:~]# rpm -qa telnet telnet-0.17-48.el6.x86_64 #这个有 [root@www:~]# rpm -qa telnet-server #这个没有 [root@www:~]# chkconfig --list 基于 xinetd 的服务: #xinetd这里也没有telnet [root@www:~]# yum install -y telnet-server #下载telnet-server [root@www:~]# chkconfig --list 基于 xinetd 的服务: telnet: 关闭现在有telnet,但是服务是关闭的,将其打开
[root@www:~]# service xinetd restart 停止 xinetd: [确定] 正在启动 xinetd: [确定] [root@www:~]# service telnet start telnet: 未被识别的服务 [root@www:~]# chkconfig telnet on [root@www:~]# chkconfig --list 基于 xinetd 的服务: telnet: 启用 [root@www:~]# telnet mail.crwolf.com 25 Trying 192.168.1.9... telnet: connect to address 192.168.1.9: Connection refused #还是拒绝查看telnet的配置
[root@www:~]# vim /etc/xinetd.d/telnet disable = no #这里是接收的再看以下postfix的配置文件
[root@www:~]# vim /etc/postfix/main.cf #inet_interfaces这里没有$myhostname,添加进去 inet_interfaces = localhost --> inet_interfaces = localhost, $myhostname [root@www:~]# telnet www.crwolf.com 25 #能连接上了 Trying 192.168.1.9... Connected to www.crwolf.com. Escape character is '^]'. 220 www.crwolf.com ESMTP Postfix
相关文章推荐
- telnet命令 测试端口连接是否正常
- 使用telnet访问某些服务器的端口,以测试可达性,为何有时要好几秒才能成功建立连接?
- 使用Win7连接虚拟机linux中的telnet出错解决方法
- Postfix之telnet测试
- Postfix – 使用Telnet测试Postfix
- redis连接测试程序出错
- telnet命令 测试端口连接是否正常
- app-in purchase中测试出错:itunes连接出错的解决办法
- telnet命令 测试端口连接是否正常
- 精华的微软文章".NET 数据访问架构指南",特别是数据库连接的测试.即监视链接池化 (2)
- asp.net连接ORACLE出错
- 一个测试数据库连接的函数
- ASP.NET连接ORACLE出错!
- 测试数据库连接的函数
- 精华的微软文章".NET 数据访问架构指南",特别是数据库连接的测试.即监视链接池化(1)
- .NET连接Oracle出错的解决方法【System.Data.OracleClient requires Oracle client software version 8.1.7】
- 经过测试,大家还是统一开发环境,jdk我传不到ftp中,空间不够,rmi连接也已经搞定了
- 远程连接telnet作为root的用法
- java连接数据库出错啊!请大家帮帮忙啊!!!
- 郁闷,连接sqlserver老出错,请教高手!