【问题标题】:Sending SMTP GMail through a proxy with Rails使用 Rails 通过代理发送 SMTP GMail
【发布时间】:2012-09-16 10:34:30
【问题描述】:

我正在运行一个 nginx 网络服务器,unicorn_rails 目前在生产环境中运行良好,但是当我尝试通过代理使用我的 gmail 帐户时,Actionmailer 无法发送。

我的 gmail 设置如下链接所示:http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail

SSH、webmin、https 和我打开的所有其他东西都可以正常工作,只是在 actionmailer 中没有 smtp。 接口可能有些奇怪,因为 ping 默认使用 lo 并且尝试 telnet smtp.gmail.com 587 什么也没做。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 proxy actionmailer


    【解决方案1】:

    我通过将 /etc/network/interfaces 中的行将 auto lo 更改为 auto eth0 然后使用 ifconfig lo downshutdown -r nowifconfig lo up 来修复它。 出于某种原因,这使得ping 8.8.8.8 在没有设置接口的情况下实际工作,telnet smtp.gmail.com 587 返回正确的代码。

    仍然不确定我的网络接口如何默认为 lo,但邮件服务器现在正在工作。它最终与我正确地认为设置正确的代理无关。

    【讨论】:

      猜你喜欢
      • 2011-02-08
      • 2021-11-16
      • 2018-01-09
      • 1970-01-01
      • 2015-08-19
      • 2011-09-15
      • 2017-05-12
      • 2012-04-19
      相关资源
      最近更新 更多