转载自:https://www.cnblogs.com/nulige/p/9092105.html
@H_403_4@
#创建证书@H_403_4@mkdir -p /root/.certs/@H_403_4@echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/qq.crt@H_403_4@certutil -A -n "GeoTrust SSL CA" -t "C," -d ~/.certs -i ~/.certs/qq.crt@H_403_4@certutil -A -n "GeoTrust Global CA" -t "C,255);">certutil -L -d /root/.certs@H_403_4@#信任证书@H_403_4@certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i qq.crt@H_403_4@@H_403_4@# 配置/etc/mail.rcE繁忙@H_403_4@set smtp="smtps://smtp.qq.com:465"@H_403_4@set smtp-auth=login@H_403_4@set smtp-auth-user="228444347@qq.com" #换成你的QQ邮箱@H_403_4@set smtp-auth-password="fwmazaxbllqrcajg" # 换成你的QQ邮箱第三方登录密码@H_403_4@set ssl-verify=ignore@H_403_4@#set nss-config-dir=/etc/pki/nssdb@H_403_4@set nss-config-dir=/root/.certs@H_403_4@@H_403_4@说明:@H_403_4@#smtp-auth-password的密码是QQ邮箱里面设置的第三方登录密码,不是你qq的密码,在QQ邮箱设置界面配置@H_403_4@@H_403_4@测试:@H_403_4@echo message3 | mail -v -r "" -s "hello world"228444347@qq.com@H_403_4@注意:一定要带-r参数,生产上去掉-v参数
原文链接:https://www.f2er.com/centos/374155.html