zoukankan      html  css  js  c++  java
  • 阿里云服务器使用465端口发送邮件

    关闭所有邮件服务

    一、生产一系列证书

    mkdir  ~/.certs
    #生成证书
    echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/mail.crt
    
    certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/mail.crt
    certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/mail.crt

    certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs -i ~/.certs/mail.crt #查看 certutil
    -L -d /root/.certs

    二、配置mail.rc文件

    [root@iZhp3a7sejwabcxoz89b1yZ ~]# cat  /etc/mail.rc 
    set from=xxxx@163.com  
    set smtp=smtps://smtp.163.com:465  
    set smtp-auth-user=xxx@163.com
    set smtp-auth-password=xxxxxxxxxxxxx  
    set smtp-auth=login
    set ssl-verify=ignore
    set nss-config-dir=/root/.certs

    三、测试

    yum install -y  exim mailx
    systemctl  start exim.service 
     mailx -s 'aa' xxxx@163.com  </etc/hosts

  • 相关阅读:
    python yield 理解
    创建loop设备
    git 添加submodule 以及更名
    用了linux 这么久,终于发现一个需要硬连接的地方
    gdb 查看内存
    att 汇编 helloworld
    ln 创建连接和mount -bind用法
    区间DP
    数位DP
    VS反汇编分析
  • 原文地址:https://www.cnblogs.com/zhangb8042/p/9493103.html
Copyright © 2011-2022 走看看