centos上mailx經過465端口發送郵件

最近在看zabbix發送郵件的時候,發現本身的郵件老是沒法發送,這裏多是外網防火牆禁止25端口,那麼如何繞過25端口呢?
 我使用的是163郵箱的TSL加密協議465端口
因爲mailx基本配置很簡單,在這裏就不作詳細描述,只說如何能經過465端口發送郵件
 
 

首先請求數字證書

    網頁正上方:設置→POP3/SMTP/IMAP
 
    網頁左側:客戶端受權密碼
 

最後配置/etc/mail.rc

set bsdcompat

登陸QQ郵箱查看

看起來已經成功了,可是發送完郵件還有報錯:證書不被信任,且命令行就此卡住,須要按鍵才能出現命令提示符spa

 Error in certificate: Peer's certificate issuer is not recognized.命令行

[root@PLAY ~]# cd /root/.certs/
[root@PLAY .certs]# ll
total 80
-rw-r--r-- 1 root root 1793 Jul 6 14:36 163.crt
-rw------- 1 root root 65536 Jul 6 14:37 cert8.db
-rw------- 1 root root 16384 Jul 6 14:37 key3.db
-rw------- 1 root root 16384 Jul 6 14:37 secmod.db
[root@PLAY .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.blog

相關文章
相關標籤/搜索