【问题标题】:How to send gitlab emails with different domains for postfix, smtp and mail relay如何发送具有不同域的 gitlab 电子邮件以进行 postfix、smtp 和邮件中继
【发布时间】:2016-08-02 04:04:52
【问题描述】:

我正在尝试通过 smtp 从 gitlab 获取电子邮件,但我不确定在此设置中使用哪些域/FQDN:

假设我有一个用于“coolproject”的 gitlab 服务器。

  • gitlab 服务器 可以通过coolproject.dyndns.org 访问
  • 发送邮件的电子邮件帐户gitlab@coolproject.org
  • smtp 服务器 正在主机上运行:smtp.myhoster.com

现在我正在努力正确配置后缀。所有示例总是在任何地方使用“example.com”,这在这种情况下没有帮助......

问题:

  • “/etc/mailname”(或在 /etc/postfix/main.cf:myorigin 中)应该是什么?
  • 在 /etc/postfix/main.cf 中:mydestination 是什么?
  • 在 /etc/postfix/main.cf 中:什么是中继主机?

对于gitlab.rb,我认为这是正确的?

 gitlab_rails['smtp_address'] = "smtp.hoster.com"
 gitlab_rails['smtp_user_name'] = "gitlab@coolproject.org"
 gitlab_rails['smtp_domain'] = "coolproject.org"

【问题讨论】:

    标签: email gitlab postfix-mta


    【解决方案1】:

    看起来我是在正确的轨道上,但邮件主机不接受设置。我在我的 sidekiq 日志中发现了一些 Net::ReadTimeout 错误,这将我指向了这个方向:https://github.com/gitlabhq/gitlabhq/issues/5636

    另外,感谢 gitlab irc 聊天,我得到了禁用 smtp_domain 的提示。

    所以,启用 tls,这是我的最终工作配置

    最终配置:

    gitlab_rails['smtp_address'] = "smtp.hoster.com"
    gitlab_rails['smtp_user_name'] = "gitlab@coolproject.org"
    # removed gitlab_rails['smtp_domain'] = "coolproject.org"
    gitlab_rails['smtp_tls'] = true
    

    【讨论】:

      猜你喜欢
      • 2016-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-26
      • 2011-07-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多