Skip to content

Service Desk email Rake tasks

DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab Self-Managed

The following are Service Desk email-related Rake tasks.

Secrets

GitLab can use Service Desk email secrets read from an encrypted file instead of storing them in plaintext in the file system. The following Rake tasks are provided for updating the contents of the encrypted file.

Show secret

Show the contents of the current Service Desk email secrets.

::Tabs

:::TabTitle Linux package (Omnibus)

sudo gitlab-rake gitlab:service_desk_email:secret:show

:::TabTitle Helm chart (Kubernetes)

Use a Kubernetes secret to store the Service Desk email password. For more information, read about Helm IMAP secrets.

:::TabTitle Docker

sudo docker exec -t <container name> gitlab:service_desk_email:secret:show

:::TabTitle Self-compiled (source)

bundle exec rake gitlab:service_desk_email:secret:show RAILS_ENV=production

::EndTabs

Example output

password: 'examplepassword'
user: 'service-desk-email@mail.example.com'

Edit secret

Opens the secret contents in your editor, and writes the resulting content to the encrypted secret file when you exit.

::Tabs

:::TabTitle Linux package (Omnibus)

sudo gitlab-rake gitlab:service_desk_email:secret:edit EDITOR=vim

:::TabTitle Helm chart (Kubernetes)

Use a Kubernetes secret to store the Service Desk email password. For more information, read about Helm IMAP secrets.

:::TabTitle Docker

sudo docker exec -t <container name> gitlab:service_desk_email:secret:edit EDITOR=editor

:::TabTitle Self-compiled (source)

bundle exec rake gitlab:service_desk_email:secret:edit RAILS_ENV=production EDITOR=vim

::EndTabs

Write raw secret

Write new secret content by providing it on STDIN.

::Tabs

:::TabTitle Linux package (Omnibus)

echo -e "password: 'examplepassword'" | sudo gitlab-rake gitlab:service_desk_email:secret:write

:::TabTitle Helm chart (Kubernetes)

Use a Kubernetes secret to store the Service Desk email password. For more information, read about Helm IMAP secrets.

:::TabTitle Docker

sudo docker exec -t <container name> /bin/bash
echo -e "password: 'examplepassword'" | gitlab-rake gitlab:service_desk_email:secret:write

:::TabTitle Self-compiled (source)

echo -e "password: 'examplepassword'" | bundle exec rake gitlab:service_desk_email:secret:write RAILS_ENV=production

::EndTabs

Secrets examples

Editor example

The write task can be used in cases where the edit command does not work with your editor:

sudo docker exec -t <container name> gitlab:service_desk_email:secret:show
```0

**KMS integration example**

It can also be used as a receiving application for content encrypted with a KMS:

```shell
sudo docker exec -t <container name> gitlab:service_desk_email:secret:show
```1

**Google Cloud secret integration example**

It can also be used as a receiving application for secrets out of Google Cloud:

```shell
sudo docker exec -t <container name> gitlab:service_desk_email:secret:show
```2