注意阿里云已经封禁25端口,必须先配置ssl登录
https://www.cnblogs.com/liutao97/p/8387244.html
mkdir -p /root/.certs/
echo -n | openssl s_client -connect smtp.126.com:465 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p‘ > ~/.certs/qq.crtcertutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crtcertutil -L -d /root/.certs<br><br>若需要qq的ssl 只需把第二条命令中的smtp.xxx.com:465 给替换了就行set from=xxxooo@126.com
set smtp=smtps://smtp.126.com:465set smtp-auth-user=xxxooo@126.comset smtp-auth-password=你的授权码set smtp-auth=loginset ssl-verify=ignoreset nss-config-dir=/root/.certsecho "HEllo_test_test1" | mailx -v -s "zabbix_test_mail" 568353087@qq.com
原文:https://www.cnblogs.com/ying568353087/p/13365061.html