postfix本機(jī)測試本機(jī)時,telnet連接出錯

正向解析、反向解析都沒有問題,postfix默認(rèn)端口為25

網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了宣威免費(fèi)建站歡迎大家使用!

配置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
關(guān)閉 postfix:                                             [確定]
啟動 postfix:                                             [確定]
[root@www:/etc/postfix]# vim /etc/resolv.conf 
nameserver 192.168.1.9將DNS解析指向本機(jī)
[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服務(wù)

[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 的服務(wù):           #xinetd這里也沒有telnet
[root@www:~]# yum install -y telnet-server        #下載telnet-server
[root@www:~]# chkconfig --list
基于 xinetd 的服務(wù):
telnet:        關(guān)閉

現(xiàn)在有telnet,但是服務(wù)是關(guān)閉的,將其打開

[root@www:~]# service xinetd restart
停止 xinetd:                                              [確定]
正在啟動 xinetd:                                          [確定]
[root@www:~]# service telnet start
telnet: 未被識別的服務(wù)
[root@www:~]# chkconfig telnet on
[root@www:~]# chkconfig --list
基于 xinetd 的服務(wù):
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,添加進(jìn)去
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

本文名稱:postfix本機(jī)測試本機(jī)時,telnet連接出錯
鏈接分享:http://bm7419.com/article0/psssio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、云服務(wù)器網(wǎng)站制作、手機(jī)網(wǎng)站建設(shè)、Google網(wǎng)頁設(shè)計公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)