我有以下smtp配置(/redmine_path/config/configuration.yml)
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'
您希望这是TLS / SMTP邮件服务器配置的正确配置。
但是当您尝试发送测试电子邮件时。您收到以下错误: 发送邮件时发生错误(SSL_connect返回= 1 errno = 0状态=错误:证书验证失败)
答案 0 :(得分:0)
ca_file: "/etc/ssl/certs/ca-certificates.crt"
或
ca_path: "/etc/ssl/certs/"
更改之后,Redmine会正确找到CA根证书。
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"
将“ package-manager”交换为yum,apt-get或zypper
<package-manager> install ca-certificates
我想知道有多少人放弃了,只是将openssl_verify_mode设置为“ none”。恐怕无法想到中间人攻击。
有关Ruby ActionMailer :: Base配置的详细信息:ActionMailer SMTP "certificate verify failed"