GitLab email notifications not sending

前端 未结 2 731
南方客
南方客 2021-02-04 07:48

I just recently install GitLab v5.0 on an Ubuntu 12.04 server and am now having issues with email notifications. I can\'t get GitLab to send any emails of any kind.

I\'

相关标签:
2条回答
  • 2021-02-04 08:09

    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
    

    0 讨论(0)
  • 2021-02-04 08:14

    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'
      }
    
    0 讨论(0)
提交回复
热议问题