Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IMAP Microsoft Graph Configs #2610

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ docker run --name gitlab -d \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:15.1.2
```
IMAP [Microsoft Graph](https://docs.gitlab.com/ee/administration/incoming_email.html#microsoft-graph)
antt1995 marked this conversation as resolved.
Show resolved Hide resolved

Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of IMAP parameters that can be specified.

Expand Down Expand Up @@ -1870,6 +1871,22 @@ Enable STARTSSL. Defaults to `false`.

The name of the mailbox where incoming mail will end up. Defaults to `inbox`.

##### `IMAP_METHOD`

Method blank or microsoft_graph

##### `IMAP_TENANT_ID`

Azure AD Tenant ID

##### `IMAP_CLIENT_ID`

Azure AD App Client ID

##### `IMAP_CLIENT_SECRET`

Azure AD App Client Secret

antt1995 marked this conversation as resolved.
Show resolved Hide resolved
##### `LDAP_ENABLED`

Enable LDAP. Defaults to `false`
Expand Down
7 changes: 7 additions & 0 deletions assets/runtime/config/gitlabhq/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ production: &base

# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted: false

# For Microsoft Graph support
inbox_method: {{IMAP_METHOD}}
inbox_options:
tenant_id: "{{IMAP_TENANT_ID}}"
client_id: "{{IMAP_CLIENT_ID}}"
client_secret: "{{IMAP_CLIENT_SECRET}}"

## Build Artifacts
artifacts:
Expand Down
4 changes: 4 additions & 0 deletions assets/runtime/env-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ IMAP_SSL=${IMAP_SSL:-true}
IMAP_STARTTLS=${IMAP_STARTTLS:-false}
IMAP_MAILBOX=${IMAP_MAILBOX:-inbox}
IMAP_TIMEOUT=${IMAP_TIMEOUT:-60}
IMAP_METHOD=${IMAP_METHOD:-}
IMAP_TENANT_ID=${IMAP_TENANT_ID:-}
IMAP_CLIENT_ID=${IMAP_CLIENT_ID:-}
IMAP_CLIENT_SECRET=${IMAP_CLIENT_SECRET:-}

if [[ -n ${IMAP_USER} ]]; then
IMAP_ENABLED=${IMAP_ENABLED:-true}
Expand Down
6 changes: 5 additions & 1 deletion assets/runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,11 @@ gitlab_configure_mailroom() {
IMAP_SSL \
IMAP_STARTTLS \
IMAP_MAILBOX \
IMAP_TIMEOUT
IMAP_TIMEOUT \
IMAP_METHOD \
IMAP_TENANT_ID \
IMAP_CLIENT_ID \
IMAP_CLIENT_SECRET
antt1995 marked this conversation as resolved.
Show resolved Hide resolved

# enable/disable startup of mailroom
echo "mail_room_enabled=${GITLAB_INCOMING_EMAIL_ENABLED}" >> /etc/default/gitlab
Expand Down