MID-11048 Add option to relax email address validation on send#578
Open
wadahiro wants to merge 1 commit intoEvolveum:support-4.10from
Open
MID-11048 Add option to relax email address validation on send#578wadahiro wants to merge 1 commit intoEvolveum:support-4.10from
wadahiro wants to merge 1 commit intoEvolveum:support-4.10from
Conversation
By setting -Dmail.mime.address.strict=false as a JVM system property, email addresses that do not strictly comply with RFC822 (e.g. consecutive dots in local part like user...name@example.com) are now accepted. We use the standard Jakarta Mail property "mail.mime.address.strict" instead of a MidPoint-specific property (e.g. midpoint.mail.address.strict) because MimeMessage.getAllRecipients() internally calls getAddressHeader() which references this property. If a custom property were used, address parsing in parseInternetAddress() would be non-strict, but getAllRecipients() at send time would still parse strictly and fail.
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.
By setting
-Dmail.mime.address.strict=falseas a JVM system property, email addresses that do not strictly comply with RFC822 (e.g. consecutive dots in local part likeuser...name@example.com) are now accepted.We use the standard Jakarta Mail property
mail.mime.address.strictinstead of a MidPoint-specific property (e.g.midpoint.mail.address.strict) becauseMimeMessage.getAllRecipients()internally callsgetAddressHeader()which references this property. If a custom property were used, address parsing inparseInternetAddress()would be non-strict, butgetAllRecipients()at send time would still parse strictly and fail.