GitLab email setup: sending via another mail server

后端 未结 7 1733
醉梦人生
醉梦人生 2020-12-13 00:46

By default gitlab has the next configuration in gitlab.yml :

email:
  from: notify@gitlabhq.com
  host: gitlabhq.com

but, I ne

7条回答
  •  北海茫月
    2020-12-13 01:07

    The email:host: configuration in gitlab.yml isn't actually for the mail server/SMTP host. It's used to construct the links to your Gitlab host in the email. We call our gitlab server 'gitlab.local' (and have a DNS entry for it), so our configuration says host: gitlab.local.

    This way, when users receive an email from Gitlab, the links will work, instead of linking to http://localhost/, as is the default.

    There's some redundant configuration in there. For the git clone URLs to be displayed correctly within Gitlab, you also need to configure web:host: and git_host:host: with the same host name.

    web:
      host: gitlab.local
      port: 80
      https: false
    
    email:
       host: gitlab.local
       protocol: http
    
    git_host:
       host: gitlab.local
    

    If you are using HTTPS, change web:https:, web:port:, and email:protocol:.

提交回复
热议问题