GitLab email notifications not sending

倖福魔咒の 提交于 2019-12-02 23:12:57
Girish KG

This is my entries at the end in /config/environment/production.rb and that is working for me.


Comment out sendmail options and use external SMTP relays

  ##config.action_mailer.delivery_method = :sendmail ## Comment out this
  # Defaults to:
  ## config.action_mailer.sendmail_settings = {
  ##   :location => '/usr/sbin/sendmail',
  ##   :arguments => '-i -t'
  ## }

  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true

  ## SMTP Settings
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
      :address => '10.146.10.90', ## My SMTP Relay/Gateway
      :port => 25, ## SMTP Port
      :domain => 'gitlab.example.com', ## My Domain
      :authentication => :plain, ## Let it be plain as it is inside my LAN
      ##:user_name => 'gitlab@yourserver.com', ## This is not required as long as 
      ##:password => 'yourPassword', ## SMTP Gateway allows anonymous relay
      ##:enable_starttls_auto => true ## In LAN
      ##:user_name => '',
      ##:password => '',
      :enable_starttls_auto => true
  }
end

On CentOS, this helped for me:

check your file /home/git/gitlab/config/environments/production.rb (if your running on production, wich is standard)

There you can change your sendmail settings. You should try to remove the -t parameter, wich fixed it for me! Some mailservers don't accept this parameter (check your maillog to be sure)

  config.action_mailer.sendmail_settings = {
    :location => '/usr/sbin/sendmail',
    :arguments => '-i'
  }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!