从 Rails 进行 Exchange 身份验证时无法识别身份验证类型

发布于 2024-10-10 01:14:22 字数 681 浏览 0 评论 0原文

尝试从 Ruby on Rails 向 Exchange Server 进行身份验证时出现此错误:

504 5.7.4 无法识别的身份验证 类型

config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "x.x.x.x",
  :port                 => 25,
  :user_name            => "xxdomain\xxuser",
  :password             => "xxxxxx",
  :authentication       => :login,
  :enable_starttls_auto => true
}

我尝试了各种配置设置组合,包括更改设置以使用“普通”身份验证、添加域、将enable_starttls_auto 设置为 true、false,以及完全删除它、删除端口 没有任何效果。

有什么想法吗?

I'm getting this error when trying to authenticate with Exchange Server from Ruby on Rails:

504 5.7.4 Unrecognized authentication
type

config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "x.x.x.x",
  :port                 => 25,
  :user_name            => "xxdomain\xxuser",
  :password             => "xxxxxx",
  :authentication       => :login,
  :enable_starttls_auto => true
}

I've tried all sorts of combinations of configuration settings, including changing the settings to use "plain" authentication, adding the domain, setting enable_starttls_auto to true, false, and removing it entirely, removing the port. Nothing has worked.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒废 2024-10-17 01:14:22

以下内容来自链接:

Rails 和 Exchange电子邮件验证

1) 将ruby-ntlm gem 添加到您的 Gemfile 中并运行bundle install

2) 将 NTLM SMTP 库添加到 config/environment.rb 文件中。

# Load the rails application
  require File.expand_path('../application', __FILE__)
  require 'ntlm/smtp'
# Initialize the rails application
  RailsApp::Application.initialize! 

3) 设置环境文件以使用 NTLM 进行身份验证。

config.active_support.deprecation = :notify
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
 :address => '<your-email-server>',
 :domain => '<your-domain>',
 :user_name => '<your-username>',
 :password => '<your-unencrypted-password>',
 :port => 25,
 :authentication => :ntlm

****用你自己的值替换***

The below is from link:

Rails and Exchange Email Auth

1) Add the ruby-ntlm gem to your Gemfile and run bundle install.

2) Add the NTLM SMTP library to your config/environment.rb file.

# Load the rails application
  require File.expand_path('../application', __FILE__)
  require 'ntlm/smtp'
# Initialize the rails application
  RailsApp::Application.initialize! 

3) Set up your environment file to authenticate with NTLM.

config.active_support.deprecation = :notify
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
 :address => '<your-email-server>',
 :domain => '<your-domain>',
 :user_name => '<your-username>',
 :password => '<your-unencrypted-password>',
 :port => 25,
 :authentication => :ntlm

****replace values with you own***

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文