mail_room: Make it possible to configure delete after delivery behavior
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:
With this set to false
, the message remains in the inbox:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.