Use additional headers for matching service desk email
What does this MR do and why?
There are 2 ways how to configure Service desk - either using the general incoming email address or configuring a custom service desk address.
In the general email receiver we check not only email to
but also additional headers. Therefore also eg. replies are correctly identified. We don't do that in the Service desk receiver.
This MR fixes that (and also includes small refactoring)
How to set up and validate locally
- Configure incoming emails
- [Configure custom email address for service desk](1. Configure incoming emails)
- Update
gitlab-mail_room
gem to version0.0.13
in https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile#L442 - Run mailroom
bundle exec mail_room -c './config/mail_room.yml'
- Go to project settings and find support desk address (eg. http://127.0.0.1:3000/flightjs/Flight/edit)
- Send an email to that address, cc another email that you have access to
- Check the project issues, a new issue should be created (eg. http://127.0.0.1:3000/flightjs/Flight/-/issues)
- Go to the second email account, a new email should arrive
- Respond to that email, don't forget to include support desk email among the recipients (Reply all)
- Go to the previously created issue, a new comment should be created
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.
Related to #346600 (closed)