Add X-Forwarded-To to allowed headers for email ingestion
When forwarding emails in Microsoft O365 (depending on the forwarding method) the forwarding target may be added to the X-Forwarded-To header.
If the customer wants to use the custom email feature, then this issue Custom Email: O365 forwarding doesn't add forwa... (#496396 - closed) might resolve any setup problems. But if the customer just wants to forward emails, those emails will be rejected.
Implementation
You can use this MR as a template Support X-Original-To headers for email ingestion (!149874 - merged)
- Add header processing to
lib/gitlab/email/receiver.rb - Add specs to
spec/lib/gitlab/email/receiver_spec.rb - Add documentation to
doc/administration/incoming_email.md
Edited by Marc Saleiko