JAMES-4213 Check whether alias target is valid when receiving email for alias#3073
Draft
felixauringer wants to merge 1 commit into
Draft
JAMES-4213 Check whether alias target is valid when receiving email for alias#3073felixauringer wants to merge 1 commit into
felixauringer wants to merge 1 commit into
Conversation
Currently, it is only checked if the recipient is a user or if there is a mapping with the recipient as source. It is not checked that this mapping actually points to a local mailbox. We do not want to accept emails that go directly to an error repository, so this should be catched after the SMTP RCPT command. I opted to accept a recipient if it resolves to at least one mailbox that is present. I would be in favor to enforce that all targets it resolves to are valid but that may break some poorly maintained groups, I guess.
Contributor
Author
|
I have not adapted the tests yet, so they will probably fail. |
Contributor
|
My point of view is that if there's an alias or somehting alike we manages this and if we manages this it should come in. Some people actually have RRT mappings without local mailbox which is valid. And used. I'd favour an approach that prevent invalid RRT creation in the first place and/or removes/correct RRT as needed, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, it is only checked if the recipient is a user or if there is a mapping with the recipient as source. It is not checked that this mapping actually points to a local mailbox.
We do not want to accept emails that go directly to an error repository, so this should be catched after the SMTP RCPT command.
I opted to accept a recipient if it resolves to at least one mailbox that is present. I would be in favor to enforce that all targets it resolves to are valid but that may break some poorly maintained groups, I guess.
Note: This also prepares for linagora/tmail-backend#2446 by separating the check whether a mailbox exists from the step that applies the RRT. See also the MR in that repository: linagora/tmail-backend#2448.
Jira issue: https://issues.apache.org/jira/projects/JAMES/issues/JAMES-4213