Skip to content
Snippets Groups Projects

mail_room: Make it possible to configure delete after delivery behavior

Merged Stan Hu requested to merge sh-configure-delete-after-delivery into master

What does this MR do and why?

In IMAP, delete_after_delivery only marks the message as deleted, but a separate expunge_deleted step is needed to permanently remove the message.

In Microsoft Graph, delete_after_delivery soft-deletes the messages, but the message is automatically expunged after a retention period, typically 14 days. An admin can manually expunge deleted messages via the command-line.

delete_after_delivery has been set to true since 712d1768 since it wasn't necessary to configure this for IMAP, but it is necessary for Microsoft Graph since this auto-expunge behavior may not be desired. We now make this option configurable with true by default.

This requires Omnibus support: omnibus-gitlab!6605 (merged)

Relates to #386770 (closed)

Testing

With this merge request and omnibus-gitlab!6605 (merged) applied on an Omnibus instance, configure:

gitlab_rails['incoming_email_delete_after_delivery'] = false

Then run gitlab-ctl reconfigure.

With this set to true or omitted, the message is deleted:

image

With this set to false, the message remains in the inbox:

image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Merged results pipeline #742665069 passed

Pipeline: GitLab

#742666467

    Merged results pipeline passed for cb9060af

    Test coverage 81.34% (5.84%) from 2 jobs

    Merged by charlie ablettcharlie ablett 2 years ago (Jan 15, 2023 9:15pm UTC)

    Loading

    Pipeline #747844269 passed with warnings

    Pipeline: GitLab

    #747845131

      Pipeline: GitLab

      #747845135

        Pipeline passed with warnings for 414ce215 on master

        Test coverage 75.48% (5.84%) from 2 jobs
        10 environments impacted.

        Activity

        Filter activity
        • Approvals
        • Assignees & reviewers
        • Comments (from bots)
        • Comments (from users)
        • Commits & branches
        • Edits
        • Labels
        • Lock status
        • Mentions
        • Merge request status
        • Tracking
        Please register or sign in to reply
        Loading