日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

centos 7 安装 mail

發布時間:2023/12/20 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos 7 安装 mail 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
yum install -y sendmail

將下面內容粘貼到/etc/mail.rc中

set ssl-verify=ignore set nss-config-dir=/root/.certs set from=xxx@163.com set smtp=smtps://smtp.exmail.qq.com:465 set smtp-auth-user=xxx@163.com set smtp-auth-password=xxxx set smtp-auth=login

逐行執行下面指令

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

重啟sendmail服務

systemctl restart sendmail

發送郵件

mail -v -s "test" 351865576@qq.com< /data/content.txt

?

錯誤:

Error initializing NSS: Unknown error -8015.

上面的錯誤是因為沒有權限導致

修復辦法:

1. 修改.certs 第三組權限為rwx

chmod 777 -R?.certs

第一組權限:文件所有者有讀的權限

第二組權限:文件所有者的組用戶有執行和讀的權限

第三組權限:不與文件所有者同組的用戶有執行的權限,但是沒有讀的權限。

2. 將.certs移動到/etc/mail/目錄下

3. 修改/etc/mail.rc中的/root/.certs為/etc/mail/.certs

4. 重啟服務

轉載于:https://www.cnblogs.com/zyh1994/p/10883364.html

總結

以上是生活随笔為你收集整理的centos 7 安装 mail的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。