应用建议后,CentOS 7 上的 GitLab(未发送电子邮件)

应用建议后,CentOS 7 上的 GitLab(未发送电子邮件)

GitLab 未发送邮件

GitLab 电子邮件通知未发送

已尝试过,但没有成功。

我有一个 GIT,其中 GitLab 是 Web 管理设置。但是,尽管使用了 gmail-smtp 和上述建议,邀请/确认电子邮件仍未发送

[/etc/httpd/conf/httpd.conf 的一部分]

DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride none
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None
        #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

[/etc/gitlab/gitlab.rb]

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "smt3214"
gitlab_rails['smtp_domain'] = "smtp.gmail.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['smtp_openssl_verify_mode'] = 'peer' # Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
# gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
# gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"

[/opt/gitlab/embedded/service/gitlab-rails/config/environments/production.rb]

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

  config.eager_load = true

  config.allow_concurrency = false


  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
      :address => 'smtp.gmail.com', ## My SMTP Relay/Gateway
      :port => 587, ## SMTP Port
      :domain => 'smtp.gmail.com', ## My Domain
      :authentication => :login, ## Let it be plain as it is inside my LAN
      :user_name => 'gitsmt111', ## This is not required as long as 
      :password => 'smt3214', ## SMTP Gateway allows anonymous relay
      :enable_starttls_auto => true ## In LAN
     }



end

[/var/log/邮件日志]

Apr  5 10:50:34 lab-git postfix/pickup[2247]: CDF0D82CD235: uid=1001 from=<gitlab@lab-git>
Apr  5 10:50:34 lab-git postfix/cleanup[15670]: CDF0D82CD235: message-id=<[email protected]>
Apr  5 10:50:34 lab-git postfix/qmgr[2248]: CDF0D82CD235: from=<[email protected]>, size=802, nrcpt=1 (queue active)
Apr  5 10:50:35 lab-git postfix/smtp[15674]: CDF0D82CD235: to=<[email protected]>, relay=alln-mx-01.srx-in.com[173.37.147.230]:25, delay=0.21, delays=0.02/0.01/0.14/0.04, dsn=5.0.0, status=bounced (host alln-mx-01.srx-in.com[173.37.147.230] said: 553 Domain of sender address <[email protected]> does not resolve. (in reply to MAIL FROM command))
Apr  5 10:50:35 lab-git postfix/cleanup[15670]: 16B2D82CD236: message-id=<[email protected]>
Apr  5 10:50:35 lab-git postfix/bounce[15675]: CDF0D82CD235: sender non-delivery notification: 16B2D82CD236
Apr  5 10:50:35 lab-git postfix/qmgr[2248]: 16B2D82CD236: from=<>, size=2826, nrcpt=1 (queue active)
Apr  5 10:50:35 lab-git postfix/qmgr[2248]: CDF0D82CD235: removed
Apr  5 10:50:35 lab-git postfix/local[15676]: 16B2D82CD236: to=<[email protected]>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=5.1.1, status=bounced (unknown user: "gitlab")
Apr  5 10:50:35 lab-git postfix/qmgr[2248]: 16B2D82CD236: removed
Apr  5 12:33:42 lab-git postfix/postfix-script[2105]: starting the Postfix mail system
Apr  5 12:33:42 lab-git postfix/master[2200]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr  5 13:11:54 lab-git postfix/postfix-script[2223]: starting the Postfix mail system
Apr  5 13:11:54 lab-git postfix/master[2249]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr  5 13:29:25 lab-git postfix/postfix-script[2170]: starting the Postfix mail system
Apr  5 13:29:25 lab-git postfix/master[2197]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr  5 13:40:24 lab-git postfix/postfix-script[2281]: starting the Postfix mail system
Apr  5 13:40:24 lab-git postfix/master[2303]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr  5 15:06:51 lab-git postfix/postfix-script[2102]: starting the Postfix mail system
Apr  5 15:06:51 lab-git postfix/master[2117]: daemon started -- version 2.10.1, configuration /etc/postfix
[root@lab-git ~]#  

相关内容