gitlab配置smtp, ldap

配置smtp

1
2
3
4
5
6
7
8
9
10
11
12
13
#configuration for smtp
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.mxhichina.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "gitlab@gos.com"
gitlab_rails['smtp_password'] = "xxxxxx"
gitlab_rails['smtp_domain'] = "gos.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
#gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
gitlab_rails['smtp_tls'] = false
gitlab_rails['gitlab_email_from'] = 'gitlab@gos.com'
#gitlab_rails['gitlab_email_reply_to'] = 'gitlab@gos.com'

配置LDAP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'x.x.x.x'
port: 389
uid: 'uid'
method: 'plain' # "tls" or "ssl" or "plain"
bind_dn: 'cn=Manager,dc=xxx,dc=com'
password: 'xxx'
active_directory: true
allow_username_or_email_login: true
block_auto_created_users: false
base: 'dc=xxx,dc=com'
user_filter: ''
attributes:
username: ['uid', 'userid', 'sAMAccountName']
email: ['mail', 'email', 'userPrincipalName']
name: 'cn'
first_name: 'givenName'
last_name: 'sn'
EOS
1
gitlab-ctl reconfigure

参考链接

  1. SMTP settings
  2. LDAP

本文标题:gitlab配置smtp, ldap

文章作者:Louis

发布时间:2017年12月22日 - 13:12

最后更新:2018年02月07日 - 17:02

原始链接:/2017/12/22/gitlab/

许可协议: Louis-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。