遇到报错:
报错一: 没有启用基于https的邮件发送
报错二:没有设置证书对应路径
报错三:没有正确的添加证书到证书数据库中
基本邮件配置,在/etc/mail.rc文件内
set smtp=smtps://smtp.xxx.com:465 # 这里填入smtp地址 set smtp-auth=login # 认证方式 set smtp-auth-user=user@xxx.com # 这里输入邮箱账号 set smtp-auth-password=password # 这里填入密码 set ssl-verify=ignore # 忽略证书警告 set nss-config-dir=/home/loki/.certs # 证书所在目录 set from=user@xxx.com # 设置发信人邮箱和昵称 #set smtp-use-starttls=yes # STARTTLS时使用
PS:163网页端的基本开启smtp/pop3 这里不做详解
生成证书
mkdir -p /home/loki/.certs/
echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt # 向163请求证书
-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = GeoTrust CN RSA CA G1
verify return:1
depth=0 C = CN, ST = Zhejiang, L = Hangzhou, O = "NetEase (Hangzhou) Network Co., Ltd", OU = IT Dept., CN = *.163.com
verify return:1
DONE
# 添加证书到证书数据库中
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i 163.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -L -d /home/loki/.certs/ # 效验证书信息
# 查看创建的目录产生的文件信息