Skip to content

Incoming email had to be switched back to sidekiq

Summary

Incoming email wasn't working; I had to add an undocumented flag in order to switch delivery method to 'sidekiq' to get it to work.

Steps to reproduce

  1. Set up incoming email as per https://docs.gitlab.com/ee/administration/incoming_email.html#configuration-examples

  2. gitlab-ctl reconfigure

  3. /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml contains the following:

    incoming_email:
      delivery_method: webhook
      secret_file: .gitlab_incoming_email_secret

    However, /opt/gitlab/embedded/service/gitlab-rails/.gitlab_incoming_email_secret is not created

  4. Delivery via webhook fails

After finding !5927 (merged) I have added the following line to /etc/gitlab/gitlab.rb:

gitlab_rails['incoming_email_delivery_method'] = "sidekiq"

and incoming mail now works as expected.

What is the current bug behavior?

  1. Documentation at https://docs.gitlab.com/ee/user/project/service_desk.html#configuring-a-custom-mailbox does not mention the new webhook delivery option added in !5927 (merged)
  2. Contrary to !5927 (merged), /opt/gitlab/embedded/service/gitlab-rails/.gitlab_incoming_email_secret is not created

What is the expected correct behavior?

As documented in !5927 (merged):

When the delivery method is configured to webhook, the following things occur in order:

  • Auto-generate auth tokens if the auth token options are not specified
  • Mount those tokens to /opt/gitlab/embedded/service/gitlab-rails/.gitlab_incoming_email_secret and counterpart service_desk version.
  • Symlink those files to working directory of mailroom
  • Set the following options in gitlab.yml:
    • incoming_email.gitlab_url: point to external_url
    • incoming_email.secret_file: hard-coded path to the mounted token
    • service_desk_email.gitlab_url: point to external_url
    • service_desk_email.secret_file: hard-coded path to the mounted token

Relevant logs

Haven't figured out where to find the logs

Details of package version

Provide the package version installation details
ii  gitlab-ce      15.3.1-ce.0  amd64        GitLab Community Edition (including NGINX, Postgres, Redis)

Environment details

  • Operating System: Ubuntu 22.04.1 LTS
  • Installation Target, remove incorrect values:
    • Bare Metal Machine
    • VM: Other
  • Installation Type, remove incorrect values:
    • New installation at 15.2.2, then upgraded to 15.3.1, then restored from a backup of another instance running 15.3.1
  • Is there any other software running on the machine: No
  • Is this a single or multiple node installation? Single
  • Resources
    • CPU: 4
    • Memory total: 8Gb

Configuration details

gitlab_rails['incoming_email_delivery_method'] = "sidekiq"
gitlab_rails['incoming_email_delivery_method'] = "sidekiq"
Edited by James Polley