• mailx加163邮箱发邮件


    mailx加163邮箱发邮件

    参考:https://www.cnblogs.com/myvic/p/9579954.html

    配置

    $ yum install mailx -y
    $ vim /etc/mail.rc
    set from=m17114517139_2@163.com
    set smtp=smtps://smtp.163.com:465  
    set smtp-auth-user=m17114517139_2@163.com
    set smtp-auth-password=zhj6b266
    set smtp-auth=login
    set nss-config-dir=/root/.certs
    set ssl-verify=ignore
    
    $ mkdir -p /root/.certs/
    $ echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-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 RSA CA 2018
    verify return:1
    depth=0 C = CN, ST = Zhejiang, L = Hangzhou, O = "NetEase (Hangzhou) Network Co.,Ltd", OU = Game Dep., CN = *.163.com
    verify return:1
    DONE
    $ certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
    $ certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
    $ certutil -L -d /root/.certs
    
    Certificate Nickname                                         Trust Attributes
                                                                 SSL,S/MIME,JAR/XPI
    
    GeoTrust SSL CA                                              C,,  
    $ cd /root/.certs/
    $ certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i 163.crt
    Notice: Trust flag u is set automatically if the private key is present.
    

    测试

    $ cat test.txt 
      If we can only encounter each other rather than stay with each other,then I wish we had never encountered.
      No man or woman is worth your tears, and the one who is, won’t make you cry.
    $ cat test.txt | mail -s 'test email' haha@spam4.me
    

  • 相关阅读:
    docker 安装部署 mysql(配置文件启动)
    mac Charles抓包
    docker 安装部署 redis(配置文件启动)
    安装mysql5.6
    Linux命令
    git命令汇总
    Java程序占用的内存可能会大于Xmx
    排序
    二分查找
    Elasticsearch核心技术(一):Elasticsearch环境搭建
  • 原文地址:https://www.cnblogs.com/uscWIFI/p/11830129.html
Copyright © 2020-2023  润新知