yum -y install sendmail
systemctl start sendmail.service
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 - G3" -t "Pu,Pu,Pu" -d ./ -i 163.crt
set smtp="smtps://smtp.163.com:465"
set from="xxx@163.com"
set smtp-auth=login
set smtp-auth-user="xxx@163.com"
set smtp-auth-password="xxx" //此处是授权码 不是秘密
set ssl-verify=ignore
set nss-config-dir=/root/.certs //证书路径
echo hello | mail -s "TEST" 1277600680@qq.com
网友评论