真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Centos發(fā)郵件遇到的問題怎么解決

本篇內(nèi)容介紹了“Centos發(fā)郵件遇到的問題怎么解決”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

成都創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站制作、成都網(wǎng)站設(shè)計(jì)、蔡家坡網(wǎng)絡(luò)推廣、小程序制作、蔡家坡網(wǎng)絡(luò)營銷、蔡家坡企業(yè)策劃、蔡家坡品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);成都創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供蔡家坡建站搭建服務(wù),24小時(shí)服務(wù)熱線:028-86922220,官方網(wǎng)址:www.cdcxhl.com

網(wǎng)易163免費(fèi)郵箱相關(guān)服務(wù)器信息:

Centos發(fā)郵件遇到的問題怎么解決

一、安裝和配置:

1.1、安裝

[root@linux-node2 ~]# yum install mailx -y

loaded plugins: fastestmirror, security

setting up install process

determining fastest mirrors

 * base: mirrors.aliyun.com

 * extras: mirrors.aliyun.com

 * updates: mirrors.aliyun.com

base            | 3.7 kb  00:00  

epel            | 3.2 kb  00:00  

epel/primary           | 3.2 mb  00:00  

epel              12521/12521

extras            | 3.4 kb  00:00  

icehouse           | 2.9 kb  00:00

updates            | 3.4 kb  00:00  

updates/primary_          | 1.2 mb  00:00  

package mailx-12.4-8.el6_6.x86_64 already installed and latest version

nothing to do

1.2、配置(以163郵箱為例)

首先你的郵箱要支持你的需求,到郵箱里去配置

 Centos發(fā)郵件遇到的問題怎么解決

Centos發(fā)郵件遇到的問題怎么解決

然后到/etc/mail.rc的配置文件中去添加

set from=admin@163.com smtp=smtp.163.com smtp-auth-user=admin smtp-auth-password=xxxxxx  smtp-auth=login

[root@linux-node2 ~]# echo “12345” | mail -v -s “test” 

至此應(yīng)該是沒問題,但是就是收不到郵件。得了,開始排錯(cuò)!所有的網(wǎng)絡(luò)、配置檢查完成后,還是收不到郵件,最后檢查到端口發(fā)現(xiàn)問題?。?!

[root@linux-node2 ~]# telnet smtp.163.com 25

trying 220.181.12.17...

^c

[root@orcherstrator ~]# nc -vz -w 1 smtp.163.com 25

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

nc: connect to smtp.163.com port 25 (tcp) timed out: operation now in progress

原來服務(wù)器根本就不能和第三方郵箱建立連接,問題找到,開始處理,一查才知道阿里云服務(wù)器把25端口給封了,需要申請解封。好吧!登錄管理控制臺,開始申請?。?!

Centos發(fā)郵件遇到的問題怎么解決

Centos發(fā)郵件遇到的問題怎么解決 

阿里云的審核速度還挺快的,兩個(gè)多小時(shí)后反饋結(jié)果了,不過看看就吐口老血!?。?/p>

Centos發(fā)郵件遇到的問題怎么解決 

只能想其他的辦法唄?。∽詈鬀Q定使用163郵箱的465加密端口

[root@orcherstrator ~]# telnet smtp.163.com 465

trying 220.181.12.14...

connected to smtp.163.com.

escape character is '^]'.

^c

connection closed by foreign host.

root@orcherstrator ~]# nc -vz -w 1 smtp.163.com 465

connection to smtp.163.com 465 port [tcp/urd] succeeded!

看樣子有戲哦?。?!修改/etc/mail.rc的配置

set from=admin@163.com

set smtp="smtps://smtp.163.com:465"

set smtp-auth-user=admin@163.com

set smtp-auth-password=xxxxx

set smtp-auth=login

set smtp-use-starttls

set ssl-verify=ignore

set nss-config-dir=/etc/pki/nssdb/

[root@linux-node2 ~]# echo 'hello' |mail -v -s "test" yueyuancun@163.com

resolving host smtp.163.com . . . done.

connecting to 123.125.50.133 . . . connected.

error in certificate: peer's certificate issuer is not recognized. ##沒有對端的證書 

comparing DNS name: "*.163.com"

ssl parameters: cipher=aes-128-gcm, keysize=128, secretkeysize=128,

issuer=cn=geotrust ssl ca - g3,o=geotrust inc.,c=us

subject=cn=*.163.com,o="netease (hangzhou) network co., ltd",l=hangzhou,st=zhejiang,c=cn

220 163.com anti-spam gt for coremail system (163com[20141201])

>>> ehlo linux-node2

250-mail

250-pipelining

250-auth login plain

250-auth=login plain

250-coremail 1uxr2xkj7kg0xki17xgru7i0s8fy2u3uj8cz28x1uuuuu7ic2i0y2ufvhs-cuca0xdruuuuj

250-starttls

250 8bitmime

>>> auth login

334 dxnlcm5hbwu6

>>> exvlexvhbmn1bkaxnjmuy29t

334 ugfzc3dvcmq6

>>> agvsbg9uawhhbze5odkxma==

535 error: authentication failed

smtp-server: 535 error: authentication failed

"/root/dead.letter" 11/299

. . . message not sent. ##郵件沒有發(fā)出去

至此,網(wǎng)上的case都說能收到郵件,但是我這就是收不到,那就根據(jù)錯(cuò)誤來解決唄!??!搞證書

[root@linux-node2 ~]# mkdir -p /root/.certs/

[root@linux-node2 ~]# echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-begin certificate-/,/-end certificate-/p' > ~/.certs/163.crt

depth=2 c = us, o = geotrust inc., cn = geotrust global ca

verify return:1

depth=1 c = us, o = geotrust inc., cn = geotrust ssl ca - g3

verify return:1

depth=0 c = cn, st = zhejiang, l = hangzhou, o = "netease (hangzhou) network co., ltd", cn = *.163.com

verify return:1

done

[root@linux-node2 ~]# certutil -a -n "geotrust ssl ca" -t "c,," -d ~/.certs -i ~/.certs/163.crt

[root@linux-node2 ~]# certutil -a -n "geotrust global ca" -t "c,," -d ~/.certs -i ~/.certs/163.crt

[root@linux-node2 ~]# certutil -l -d /root/.certs

certificate nickname                                      trust attributes

                                                   ssl,s/mime,jar/xpi

geotrust ssl ca                                          c,,  

[root@linux-node2 ~]# cd /root/.certs/

[root@linux-node2 .certs]# certutil -a -n "geotrust ssl ca - g3" -t "pu,pu,pu"  -d ./ -i 163.crt

notice: trust flag u is set automatically if the private key is present.

[root@linux-node2 .certs]# cd 

[root@linux-node2 ~]# vim /etc/mail.rc 

set from=admin@163.com

set smtp="smtps://smtp.163.com:465"

set smtp-auth-user=admin@163.com

set smtp-auth-password=xxxxx

set smtp-auth=login

set smtp-use-starttls

set ssl-verify=ignore

set nss-config-dir=/root/.certs

[root@linux-node2 ~]# echo 'hello' |mail -v -s "test" admin@163.com

resolving host smtp.163.com . . . done.

connecting to 123.125.50.132 . . . connected.

comparing dns name: "*.163.com"

ssl parameters: cipher=aes-128-gcm, keysize=128, secretkeysize=128,

issuer=cn=geotrust ssl ca - g3,o=geotrust inc.,c=us

subject=cn=*.163.com,o="netease (hangzhou) network co., ltd",l=hangzhou,st=zhejiang,c=cn

220 163.com anti-spam gt for coremail system (163com[20141201])

>>> ehlo linux-node2

250-mail

250-pipelining

250-auth login plain

250-auth=login plain

250-coremail 1uxr2xkj7kg0xki17xgru7i0s8fy2u3uj8cz28x1uuuuu7ic2i0y2uf6b612uca0xdruuuuj

250-starttls

250 8bitmime

>>> auth login

334 dxnlcm5hbwu6

>>> exvlexvhbmn1bkaxnjmuy29t

334 ugfzc3dvcmq6

>>> agvsbg9uawhhbze5odk=

235 authentication successful

>>> mail from:

250 mail ok

>>> rcpt to:

250 mail ok

>>> data

354 end data with .

>>> .

250 mail ok queued as smtp2,dngowadh53ejp5bbgyuhaa--.2s2 1536206732

>>> quit

221 bye

終于成功了?。。。?/p>

Centos發(fā)郵件遇到的問題怎么解決

“Centos發(fā)郵件遇到的問題怎么解決”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!


文章名稱:Centos發(fā)郵件遇到的問題怎么解決
文章路徑:http://weahome.cn/article/jgdpog.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部