首页 > 其他 > 详细

mialx配置qq邮箱发送邮件

时间:2017-01-08 09:51:37      阅读:1106      评论:0      收藏:0      [点我收藏+]

#send mail use mailx(v12.0.4)
#edit configure file

set smtp-use-starttls
set from=xxxxxxxxx@qq.com
set smtp=smtp://smtp.qq.com:587
set smtp-auth-user=xxxxxxxxx@qq.com
set smtp-auth-password=xxxxxxxxxxxx
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/

 

#can send,but cause a error that "Error in certificate: Peer‘s certificate issuer is not recognized."So change a method that don‘t know why,but it works:

mkdir /root/.certs/
echo -n | openssl s_client -connect smtp.qq.com: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
cd .certs
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu"  -d ./ -i qq.crt

vim /etc/mail.rc
set nss-config-dir=/root/.certs/

 

最后,好像使用crond执行定时任务时,程序里都需要使用绝对路径。

mialx配置qq邮箱发送邮件

原文:http://www.cnblogs.com/hqqq/p/6261419.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!