溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Linux Centos 7環(huán)境下的mailx代理163郵箱

發(fā)布時間:2020-08-25 06:14:38 來源:網(wǎng)絡 閱讀:404 作者:Mart_sea 欄目:系統(tǒng)運維

一、安裝mailx
yum -y install mailx

二、配制

[root@sea~]# vim /etc/mail.rc
set from=sea_xyz@163.com                           # 發(fā)送郵件后顯示的郵件發(fā)送方
set smtp.163.com                                            # 163 smtp郵件服務器
set smtp-auth-user=youremail@163.com       # 你的163郵箱
set smtp-auth-password=yourpass                 # 你的163郵箱密碼(設置頁面加密后的授權(quán)碼)
set smtp-auth=login                                         # 動作、登錄
set smtp-use-starttls                                        # 安全連接傳輸
set ssl-verify=ignore                                        # 忽略ssl驗證
set nss-config-dir=/root/.certs                         # 證書路徑

三、生成163的證書

mkdir -p /root/.certs/
echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -L -d /root/.certs

cd /root/.certs/
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i 163.crt

出現(xiàn) 下面提示說明正常
Notice: Trust flag u is set automatically if the private key is present.

四、測試發(fā)送郵件
echo " Redhat7 更換yum 源為Centos7的阿里云yum源"|mailx -s "rpm -e yum redhat" -a Centos7_yum_org_aliyun.tar.gz othermail@126.com,yourqq@qq.com

注:echo 的為郵件內(nèi)容,-s 是郵件主題,-a 為添加附件,逗號分隔多個郵箱地址。

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI