Redmine win 平台 bitnami-redmine-2.3.0-0 邮件设置

wzf_18 · 2013年05月05日 · 10 次阅读
  1. Bitnami redmine 2.3.0 包含的组件信息:
  • Redmine 2.3.0
  • Ruby 1.9.3-p392-i386-mingw32
  • Rails 3.2.13

2. 邮件设置 (configuration.yml) 和错误信息:

default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: address: mail.xxx.cn port: 25 domain: mail.xxxi.cn authentication: :login

user_name:

password:

发送测试邮件提示错误:

  • 发送邮件时发生错误 (hostname does not match the server certificate)
  1. 解决办法:

在配置文件中添加一行: enable_starttls_auto: false

参考信息:http://scottiestech.info/2009/12/21/fixing-the-actionmailer-hostname-not-match-server-certificate-error/

  1. 小结

按照参考链接中的说法,这是 Rails 2.2.2 之后 ActionMailer 自动启用加密连接引出的问题,解决办法就是把 enable_starttls_auto 设置为 false。

可能是由于 Redmine/Ruby/Rails 版本的原因,网络上还给出另外一种解决办法,即添加设置:openssl_verify_mode: 'none'。在我的实验中该方法无效,出现了新的错误信息:

  • 发送邮件时发生错误 (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)

使用 'tls: false' 同样不能解决问题。

(hostname does not match the server certificate)

你是不是启用 https 访问 redmine 了?我这边的设置没有这样的问题

没有启用 https,我的 server 是 WIN2008.

这个错误消息是 Ruby 报出来的:

  • ruby/lib/ruby/1.9.1/openssl/ssl-internal.rb: 121: raise SSLError, "hostname does not match the server certificate"

你哪里设置启用 ssl 了?

我没有设置这个,我怀疑这是当前 Redmine 版本的默认行为,所以显式地关闭 ‘enable_starttls_auto’ 可以解决问题

需要 登录 后方可回复。