Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
18b45aaa
Commit
18b45aaa
authored
Feb 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
f93bbf1b
9ec107ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
195 additions
and
190 deletions
+195
-190
doc/administration/incoming_email.md
doc/administration/incoming_email.md
+195
-190
No files found.
doc/administration/incoming_email.md
View file @
18b45aaa
...
@@ -97,133 +97,97 @@ for a real-world example of this exploit.
...
@@ -97,133 +97,97 @@ for a real-world example of this exploit.
### Omnibus package installations
### Omnibus package installations
1.
Find the
`incoming_email`
section in
`/etc/gitlab/gitlab.rb`
, enable the
1.
Find the
`incoming_email`
section in
`/etc/gitlab/gitlab.rb`
, enable the
feature
feature and fill in the details for your specific IMAP server and email account:
and fill in the details for your specific IMAP server and email account (see
[
examples
](
#config-examples
)
below).
Configuration for Postfix mail server, assumes mailbox
1.
Reconfigure GitLab for the changes to take effect:
incoming@gitlab.example.com
```ruby
gitlab_rails['incoming_email_enabled'] = true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
gitlab_rails['incoming_email_address'] = "incoming+%{key}@gitlab.example.com"
# Email account username
# With third party providers, this is usually the full email address.
# With self-hosted email servers, this is usually the user part of the email address.
gitlab_rails['incoming_email_email'] = "incoming"
# Email account password
gitlab_rails['incoming_email_password'] = "[REDACTED]"
# IMAP server host
gitlab_rails['incoming_email_host'] = "gitlab.example.com"
# IMAP server port
gitlab_rails['incoming_email_port'] = 143
# Whether the IMAP server uses SSL
gitlab_rails['incoming_email_ssl'] = false
# Whether the IMAP server uses StartTLS
gitlab_rails['incoming_email_start_tls'] = false
# The mailbox where incoming mail will end up. Usually "inbox".
```sh
gitlab_rails['incoming_email_mailbox_name'] = "inbox"
sudo gitlab-ctl reconfigure
# The IDLE command timeout.
sudo gitlab-ctl restart
gitlab_rails['incoming_email_idle_timeout'] = 60
```
```
Configuration for Gmail / Google Apps, assumes mailbox
1.
Verify that everything is configured correctly:
gitlab-incoming@gmail.com
```ruby
```sh
gitlab_rails['incoming_email_enabled'] = true
sudo gitlab-rake gitlab:incoming_email:check
```
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
Reply by email should now be working.
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
gitlab_rails['incoming_email_address'] = "gitlab-incoming+%{key}@gmail.com"
# Email account username
### Installations from source
# With third party providers, this is usually the full email address.
# With self-hosted email servers, this is usually the user part of the email address.
gitlab_rails['incoming_email_email'] = "gitlab-incoming@gmail.com"
# Email account password
gitlab_rails['incoming_email_password'] = "[REDACTED]"
# IMAP server host
1.
Go to the GitLab installation directory:
gitlab_rails['incoming_email_host'] = "imap.gmail.com"
# IMAP server port
gitlab_rails['incoming_email_port'] = 993
# Whether the IMAP server uses SSL
gitlab_rails['incoming_email_ssl'] = true
# Whether the IMAP server uses StartTLS
gitlab_rails['incoming_email_start_tls'] = false
# The mailbox where incoming mail will end up. Usually "inbox".
```sh
gitlab_rails['incoming_email_mailbox_name'] = "inbox"
cd /home/git/gitlab
# The IDLE command timeout.
gitlab_rails['incoming_email_idle_timeout'] = 60
```
```
Configuration for Microsoft Exchange mail server w/ IMAP enabled, assumes the
1.
Find the
`incoming_email`
section in
`config/gitlab.yml`
, enable the feature
catch-all mailbox incoming@exchange.example.com
and fill in the details for your specific IMAP server and email account (see
[
examples
](
#config-examples
)
below).
```ruby
gitlab_rails['incoming_email_enabled'] = true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
# Exchange does not support sub-addressing, so a catch-all mailbox must be used.
gitlab_rails['incoming_email_address'] = "incoming-%{key}@exchange.example.com"
# Email account username
1.
Enable
`mail_room`
in the init script at
`/etc/default/gitlab`
:
# Typically this is the userPrincipalName (UPN)
gitlab_rails['incoming_email_email'] = "incoming@ad-domain.example.com"
# Email account password
gitlab_rails['incoming_email_password'] = "[REDACTED]"
# IMAP server host
```sh
gitlab_rails['incoming_email_host'] = "exchange.example.com"
sudo mkdir -p /etc/default
# IMAP server port
echo 'mail_room_enabled=true' | sudo tee -a /etc/default/gitlab
gitlab_rails['incoming_email_port'] = 993
# Whether the IMAP server uses SSL
gitlab_rails['incoming_email_ssl'] = true
```
```
1.
Re
configure GitLab for the changes to take effect
:
1.
Re
start GitLab
:
```sh
```sh
sudo gitlab-ctl reconfigure
sudo service gitlab restart
sudo gitlab-ctl restart
```
```
1.
Verify that everything is configured correctly:
1.
Verify that everything is configured correctly:
```sh
```sh
sudo
gitlab-rake gitlab:incoming_email:check
sudo
-u git -H bundle exec rake gitlab:incoming_email:check RAILS_ENV=production
```
```
1.
Reply by email should now be working.
Reply by email should now be working.
###
Installations from source
###
Config examples
1.
Go to the GitLab installation directory:
#### Postfix
```sh
Example configuration for Postfix mail server. Assumes mailbox incoming@gitlab.example.com.
cd /home/git/gitlab
```
1.
Find the
`incoming_email`
section in
`config/gitlab.yml`
, enable the feature
Example for Omnibus installs:
and fill in the details for your specific IMAP server and email account:
```sh
```
ruby
sudo editor config/gitlab.yml
gitlab_rails
[
'incoming_email_enabled'
]
=
true
```
Configuration for Postfix mail server, assumes mailbox
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
incoming@gitlab.example.com
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
gitlab_rails
[
'incoming_email_address'
]
=
"incoming+%{key}@gitlab.example.com"
```yaml
# Email account username
incoming_email:
# With third party providers, this is usually the full email address.
# With self-hosted email servers, this is usually the user part of the email address.
gitlab_rails
[
'incoming_email_email'
]
=
"incoming"
# Email account password
gitlab_rails
[
'incoming_email_password'
]
=
"[REDACTED]"
# IMAP server host
gitlab_rails
[
'incoming_email_host'
]
=
"gitlab.example.com"
# IMAP server port
gitlab_rails
[
'incoming_email_port'
]
=
143
# Whether the IMAP server uses SSL
gitlab_rails
[
'incoming_email_ssl'
]
=
false
# Whether the IMAP server uses StartTLS
gitlab_rails
[
'incoming_email_start_tls'
]
=
false
# The mailbox where incoming mail will end up. Usually "inbox".
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
```
Example for source installs:
```
yaml
incoming_email
:
enabled
:
true
enabled
:
true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
...
@@ -250,13 +214,47 @@ for a real-world example of this exploit.
...
@@ -250,13 +214,47 @@ for a real-world example of this exploit.
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
```
```
#### Gmail
Example configuration for Gmail/G Suite. Assumes mailbox gitlab-incoming@gmail.com.
Configuration for Gmail / Google Apps, assumes mailbox
Example for Omnibus installs:
gitlab-incoming@gmail.com
```yaml
```
ruby
incoming_email:
gitlab_rails
[
'incoming_email_enabled'
]
=
true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
gitlab_rails
[
'incoming_email_address'
]
=
"gitlab-incoming+%{key}@gmail.com"
# Email account username
# With third party providers, this is usually the full email address.
# With self-hosted email servers, this is usually the user part of the email address.
gitlab_rails
[
'incoming_email_email'
]
=
"gitlab-incoming@gmail.com"
# Email account password
gitlab_rails
[
'incoming_email_password'
]
=
"[REDACTED]"
# IMAP server host
gitlab_rails
[
'incoming_email_host'
]
=
"imap.gmail.com"
# IMAP server port
gitlab_rails
[
'incoming_email_port'
]
=
993
# Whether the IMAP server uses SSL
gitlab_rails
[
'incoming_email_ssl'
]
=
true
# Whether the IMAP server uses StartTLS
gitlab_rails
[
'incoming_email_start_tls'
]
=
false
# The mailbox where incoming mail will end up. Usually "inbox".
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
```
Example for source installs:
```
yaml
incoming_email
:
enabled
:
true
enabled
:
true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
...
@@ -283,13 +281,41 @@ for a real-world example of this exploit.
...
@@ -283,13 +281,41 @@ for a real-world example of this exploit.
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
```
```
Configuration for Microsoft Exchange mail server w/ IMAP enabled, assumes the
#### MS Exchange
catch-all mailbox incoming@exchange.example.com
```yaml
Example configuration for Microsoft Exchange mail server with IMAP enabled. Assumes the
incoming_email:
catch-all mailbox incoming@exchange.example.com.
Example for Omnibus installs:
```
ruby
gitlab_rails
[
'incoming_email_enabled'
]
=
true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
# Exchange does not support sub-addressing, so a catch-all mailbox must be used.
gitlab_rails
[
'incoming_email_address'
]
=
"incoming-%{key}@exchange.example.com"
# Email account username
# Typically this is the userPrincipalName (UPN)
gitlab_rails
[
'incoming_email_email'
]
=
"incoming@ad-domain.example.com"
# Email account password
gitlab_rails
[
'incoming_email_password'
]
=
"[REDACTED]"
# IMAP server host
gitlab_rails
[
'incoming_email_host'
]
=
"exchange.example.com"
# IMAP server port
gitlab_rails
[
'incoming_email_port'
]
=
993
# Whether the IMAP server uses SSL
gitlab_rails
[
'incoming_email_ssl'
]
=
true
```
Example for source installs:
```
yaml
incoming_email
:
enabled
:
true
enabled
:
true
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
...
@@ -316,25 +342,4 @@ for a real-world example of this exploit.
...
@@ -316,25 +342,4 @@ for a real-world example of this exploit.
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
```
```
1.
Enable
`mail_room`
in the init script at
`/etc/default/gitlab`
:
```sh
sudo mkdir -p /etc/default
echo 'mail_room_enabled=true' | sudo tee -a /etc/default/gitlab
```
1.
Restart GitLab:
```sh
sudo service gitlab restart
```
1.
Verify that everything is configured correctly:
```sh
sudo -u git -H bundle exec rake gitlab:incoming_email:check RAILS_ENV=production
```
1.
Reply by email should now be working.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment