No problem with forward parsing, reverse parsing, postfix default port is 25
Configuring the Postfix configuration file
[Email protected]:/var/named]# cd/etc/postfix/[[email protected]:/etc/postfix]# vim main.cf myhostname = Www.crwolf.commyorigin = Crwolf.commydomain = Crwolf.commydestination = $myhostname, localhost. $mydomain, localhost, $ Mydomainmynetworks = 192.168.1.0/24, 127.0.0.0/8
Restart Postfix, and then test
[[Email protected]:/etc/postfix]# service postfix restart Close postfix: [OK] Start postfix: [Determine][[email protected]:/etc/postfix]# vim /etc/resolv.conf nameserver 192.168.1.9 Point DNS resolution to native [[email protected]:/etc/postfix]# telnet mail.crwolf.com 25 trying 192.168.1.9...telnet: connect to address 192.168.1.9: connection refused #连接拒绝 [[email protected]:/etc/postfix]# telnet localhost 25 #本地为什么可以? Trying ::1...connected to localhost. escape character is ' ^] '. 220 www.crwolf.com esmtp postfix
Check for problems
See if you have a Telnet service first
[Email protected]:/etc/postfix]# cd[[email protected]:~]# rpm-qa telnettelnet-0.17-48.el6.x86_64 #这个有 [email protected]:~]# rpm-qa telnet-server #这个没有 [[Email protected]:~]# chkconfig--list service based on xinetd: #xinetd这里 There is no telnet[[email protected]:~]# yum install-y telnet-server #下载telnet-server[[email protected]:~]# chkconfig--lis T XINETD-based services: Telnet: Off
Now there is telnet, but the service is turned off, open it
[[Email protected]:~]# service xinetd restart Stop xinetd: [OK] starting xinetd: [Determine][[email protected]:~]# service telnet starttelnet: Unrecognized service [[email protected]:~]# Chkconfig telnet on[[email protected]:~]# chkconfig --list based on xinetd The service:telnet: enabled [[email protected]:~]# telnet mail.crwolf.com 25trying 192.168.1.9...telnet: connect to address 192.168.1.9: connection refused #还是拒绝
Viewing the configuration of Telnet
[email protected]:~]# vim/etc/xinetd.d/telnet disable = no #这里是接收的
Then look at the following postfix configuration file
[Email protected]:~]# vim/etc/postfix/main.cf #inet_interfaces这里没有 $myhostname, add in inet_interfaces = localhost-- > inet_interfaces = localhost, $myhostname [[email protected]:~]# telnet www.crwolf.com #能连接上了Trying 192.168 .1.9...Connected to Www.crwolf.com.Escape character is ' ^] '. Www.crwolf.com ESMTP Postfix
This article is from the "three elder brother" blog, please be sure to keep this source http://523958392.blog.51cto.com/9871195/1631580
Telnet connection error when postfix native test machine