1.相关配置 vim /etc/mail.rc,在最后加如下信息
from:发送方邮件地址
smtp-auth-user:发送方邮件地址
smtp-auth-password:第三方令牌密码不是你邮箱的密码
nns-config-dir:证书路径
如果是腾讯云或者阿里云服务器那么25端口是被屏蔽的,如果要用465端口就必须有相关证书
2.生成相关证书
mkdir /root/.certs
1.echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt
2.certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
3. certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
4. certutil -L -d /root/.certs
5.cd /root/.certs && certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i 163.crt