邮件发送
    安装邮件服务
    yum install -y mailx

    开启qq邮箱授权码

    配置邮件信息
    vi /etc/mail.rc
    set from=769137439@qq.com
    set smtp=smtps://smtp.qq.com:465
    set smtp-auth-user=769137439@qq.com
    set smtp-auth-password=lpfaesbyqxsdbdha
    set smtp-auth=login
    set smtp-use=starttls
    set ssl-verify=ignore
    set nss-config-dir=/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 /root/.certs/
    certutil -A -n “GeoTrust SSL CA - G3” -t “Pu,Pu,Pu” -d ./ -i qq.crt

    测试发送邮件echo ‘test’ | mail -s ‘test’ 619644145@qq.com