Custom email: Add support for X-Delivered-To header
From #416637 (comment 1892400575)
Attempted to set up an address, e.g.,
project@example.org
, that is an forwarding alias hosted at Gandi with destinationuser@example.net
. SMTP server provided is handled by SparkPost.The verification email was received successfully the target destination inbox, e.g., user@example.net. However, it seems the headers only partially match what you are expecting for the verification process, as there is no
Delivered-To
but instead anX-Delivered-To
, namely:
From: Provider GitLab Sender Name <project@example.org>
X-Delivered-To: user+verify@example.net
To: project+verify@example.org
Proposal
Add X-Delivered-To
to the list of supported headers.
Implementation plan
You can use these MRs Support X-Original-To headers for email ingestion (!149874 - merged) and Resolve "Add X-Forwarded-To to allowed headers ... (!168716 - merged) as a reference. They add a new header to the list of the supported ones.
- 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