系统相关
首页 > 系统相关> > linux shell mail 发送邮件配置

linux shell mail 发送邮件配置

作者:互联网

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

标签:shell,crt,Pu,certutil,GeoTrust,certs,linux,mail,163
来源: https://blog.csdn.net/azh89125/article/details/123200551