Linux向QQ邮箱发送邮件

一、目标实现Linux中通过mailx向QQ邮箱中发送邮件二、配置Linux主机环境:》》下载mailx》》QQ邮箱开启服务》》生成授权码》》验证密保发送邮件后点击我已发送》》生成的授权码》》服务器配置mialvi

一、目标

  实现Linux中通过mailx向QQ邮箱中发送邮件

二、配置

Linux主机环境:

》》下载mailx

》》QQ邮箱开启服务


》》生成授权码

》》验证密保发送邮件后点击我已发送

》》生成的授权码

》》服务器配置mial

vi /etc/mail.rc
set from=<发送者的QQ号>@qq
set smtp=smtps://smtp.qq:465
set smtp-auth-user=<发送者的QQ号>@qq
set smtp-auth-password=<发送者的QQ邮箱授权码>
set smtp-auth=login
#set smtp-use-starttls 这里是不需要配置的,很多地方没说明,配置了反而会验证失败,所以我注释掉;
set ssl-verify=ignore
set nss-config-dir=/root/.certs


》》配置QQ邮箱的SSL证书

mkdir -p /root/.certs/
echo -n | openssl s_client -connect smtp.qq: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

》》生成证书
certutil -A -n “GeoTrust SSL CA - G3” -t “Pu,Pu,Pu” -d ./ -i qq.crt

》》发送邮件测试

》》成功收到邮件

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754688366a5191172.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信