Easy Redmine SMTP配置错误:发送邮件时出错(SSL_connect返回= 1 errno = 0 state =错误:证书验证失败)


浮华丶
2025-03-12 12:17:24 (27天前)


我有以下smtp配置(/redmine_path/config/configuration.yml)

默认:
email_delivery:
delivery_method :: smtp
smtp_settings:
地址:mail.example.com
港口:465


2 条回复
  1. 0# v-star*위위 | 2019-08-31 10-32



    正确的配置需要额外的参数(在Debian上测试):




    1. ca_file: “/etc/ssl/certs/ca-certificates.crt

    2. </code>


    要么




    1. ca_path: “/etc/ssl/certs/“

    2. </code>


    在此更改后,Redmine正确找到CA根证书。



    完全工作配置:




    1. default:
      email_delivery:
      delivery_method: :smtp
      smtp_settings:
      address: mail.example.com
      port: 465
      authentication: :plain
      domain: mail.example.com
      user_name: redmine@example.com
      password: xxxxxxxx
      tls: true
      enable_starttls_auto: false
      openssl_verify_mode: peer
      ca_file: “/etc/ssl/certs/ca-certificates.crt

    2. </code>


    还要确保您有更新的ca证书:



    为yum,apt-get或zypper交换“package-manager”




    1. install ca-certificates

    2. </code>


    我想知道有多少人放弃了,只是将openssl_verify_mode设置为’none’。可怕的考虑可能的中间人攻击。




    有关Ruby ActionMailer :: Base配置的更多信息
    </强>


    ActionMailer SMTP“证书验证失败”


登录 后才能参与评论