-
Notifications
You must be signed in to change notification settings - Fork 33
ISSUE-1977 Implement DNS validation mailet for outbound emails #1978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
07700c2
ISSUE-1977 Implement DNS validation mailet for outbound emails
guimard 5ff9d61
Fix compilation error: use setErrorMessage instead of setError
guimard 6e31412
Improve DNS record validation robustness
guimard 32761ba
Address chibenwa review comments (part 1)
guimard d756dbd
Correct DSN validation
chibenwa 2173af6
fixup! Correct DSN validation
chibenwa b1a1e8c
Update tmail-backend/mailets/src/main/java/com/linagora/tmail/mailet/…
chibenwa de6f65f
Use InMemoryDNSService
chibenwa 1593069
Remove Mockito usage from DkimDnsValidatorTest
guimard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
45 changes: 45 additions & 0 deletions
45
tmail-backend/mailets/src/main/java/com/linagora/tmail/mailet/dns/DnsValidationFailure.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /******************************************************************** | ||
| * As a subpart of Twake Mail, this file is edited by Linagora. * | ||
| * * | ||
| * https://twake-mail.com/ * | ||
| * https://linagora.com * | ||
| * * | ||
| * This file is subject to The Affero Gnu Public License * | ||
| * version 3. * | ||
| * * | ||
| * https://www.gnu.org/licenses/agpl-3.0.en.html * | ||
| * * | ||
| * This program is distributed in the hope that it will be * | ||
| * useful, but WITHOUT ANY WARRANTY; without even the implied * | ||
| * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * | ||
| * PURPOSE. See the GNU Affero General Public License for * | ||
| * more details. * | ||
| ********************************************************************/ | ||
|
|
||
| package com.linagora.tmail.mailet.dns; | ||
|
|
||
| /** | ||
| * Represents DNS validation failures for email authentication records. | ||
| */ | ||
| public sealed interface DnsValidationFailure permits | ||
| DnsValidationFailure.DkimValidationFailure, | ||
| DnsValidationFailure.SpfValidationFailure, | ||
| DnsValidationFailure.DmarcValidationFailure { | ||
|
|
||
| String message(); | ||
|
|
||
| /** | ||
| * DKIM DNS validation failure. | ||
| */ | ||
| record DkimValidationFailure(String message) implements DnsValidationFailure {} | ||
|
|
||
| /** | ||
| * SPF DNS validation failure. | ||
| */ | ||
| record SpfValidationFailure(String message) implements DnsValidationFailure {} | ||
|
|
||
| /** | ||
| * DMARC DNS validation failure. | ||
| */ | ||
| record DmarcValidationFailure(String message) implements DnsValidationFailure {} | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.