linux 系统飞书邮箱报警设置
飞书邮箱报警设置
- vi /etc/mail.rc
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb
set from=xxxx@yyy.ai
set smtp=smtps://smtp.feishu.cn:465
set smtp-auth-user=xxxx@yyy.ai
set smtp-auth-password=xyxyxyx123456
set smtp-auth=login
- 获取邮件服务器证书
echo -n " " | openssl s_client -connect smtp.feishu.cn:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFIICATE-/p' > /etc/pki/nssdb/feishu.crt
- 把证书添加到受信任表:
certutil -A -n 'feishu' -t "P,P,P" -d /etc/pki/nssdb -i /etc/pki/nssdb/feishu.crt