Skip to content

Support new issue creation by email without subaddressing for EE

What does this MR do?

EE version of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23523. Adds changes for service desk issues.

We could not create issues and MRs via email because the addresses we generate had the subaddressing character + embedded in them. In addition we also used the / character in the path names to allow us to identify the project. However these characters are invalid in some email systems.

We now standardize on removing these characters and using actions and project ids.

Here are some examples. Note that we're using the subaddressing version, that has incoming+ as a prefix. The catchall version would be prefixed with incoming-.

Reply email
Old incoming+1234567890abcdef1234567890abcdef@incoming.gitlab.com
New: incoming+1234567890abcdef1234567890abcdef@incoming.gitlab.com

No change necessary - the single token uniquely identifies the object being replied to.

Unsubscribe email
Old incoming+1234567890abcdef1234567890abcdef+unsubscribe@incoming.gitlab.com
New: incoming+1234567890abcdef1234567890abcdef-unsubscribe@incoming.gitlab.com

The final + is removed. The unsubscribe action is already part of the email.

New issue by email
Old incoming+gitlab-org/gitlab-ce+#{author_token}@incoming.gitlab.com
New: incoming+gitlab-org-gitlab-ce-#{project_id}-#{author_token}-issue@incoming.gitlab.com
Old incoming+victor---wu--/more-dashes--/dashed--project--+#{author_token}@incoming.gitlab.com
New: incoming+victor---wu---more-dashes---dashed--project---#{project_id}-#{author_token}-issue@incoming.gitlab.com

The path is converted using dasherize, replacing the / with -. The project id is added, which is used to identify the actual project being targeted. And the action issue is added to the end.

New MR by email
Old incoming+gitlab-org/gitlab-ce+merge-request+#{author_token}@incoming.gitlab.com
New: incoming+gitlab-org-gitlab-ce-#{project_id}-#{author_token}-merge-request@incoming.gitlab.com

The path is converted, project id added, and the merge-request action moved to the end.

New Service Desk issue by email
Old incoming+gitlab-org/gitlab-ce@incoming.gitlab.com
New: incoming+gitlab-org-gitlab-ce-#{project_id}-issue-@incoming.gitlab.com

Used in EE Only: The path is converted, project id added, and the action -issue- is added to the end (trailing - indicates it's for the service desk)

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/29951

Does this MR meet the acceptance criteria?

Edited by Coung Ngo

Merge request reports