阿里云Centos配置腾讯SMTP邮箱

which mail
yum -y install mailx
vim /etc/mail.rc

写入:

# mail config
set from=zpmail@wp.cpxiang.tech 
set smtp=smtps://smtp.qq.com:465  
set smtp-auth-user=1324928751
set smtp-auth-password=<授权码> 
set smtp-auth=login 
set nss-config-dir=/root/.certs  
set ssl-verify=ignore
mkdir -p /root/.certs
echo -n | openssl s_client -connect smtp.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
cd /root/.certs/
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i qq.crt
echo "hallo" | mail -v -s "this is Test Mail" 1324928751@qq.com

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.