2016-04-11 40 views
1

我想收到的電子郵件從通過SMTP gitlab工作不同的領域,但我不知道哪些域/ FQDN在此設置使用方法:如何發送電子郵件gitlab與後綴,SMTP和郵件中繼

假設我有一個用於「coolproject」的gitlab服務器。

  • gitlab服務器可以通過coolproject.dyndns.org
  • 能得出的電子郵件帳戶從發送是[email protected]
  • SMTP服務器在主控器運行:smtp.myhoster.com

現在我正在努力正確配置postfix。所有的例子總是用 「example.com」 無處不在,它不會在這種情況下幫助...

問題:

  • 什麼是 「在/ etc /郵件名」(或在/ etc /後綴/主.cf:myorigin)應該是?
  • 在/etc/postfix/main.cf中:什麼是mydestination?
  • 在/etc/postfix/main.cf中:什麼是relayhost?

對於gitlab.rb我認爲這是正確的?

gitlab_rails['smtp_address'] = "smtp.hoster.com" 
gitlab_rails['smtp_user_name'] = "[email protected]" 
gitlab_rails['smtp_domain'] = "coolproject.org" 

回答

0

看起來我是在正確的軌道上,但郵件主機不接受設置。我在我的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'] = "[email protected]" 
# removed gitlab_rails['smtp_domain'] = "coolproject.org" 
gitlab_rails['smtp_tls'] = true