-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed bug with DKIM and DMARC * Adjusted test cases to reflect change
- Loading branch information
Showing
3 changed files
with
62 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -124,7 +124,8 @@ DomainsWithDkim[DkimConfig.Domain] { | |
DkimConfig.Enabled == true | ||
DkimRecord := input.dkim_records[_] | ||
DkimRecord.domain == DkimConfig.Domain | ||
startswith(DkimRecord.rdata, "v=DKIM1;") | ||
ValidAnswers := [Answer | Answer := DkimRecord.rdata[_]; startswith(Answer, "v=DKIM1;")] | ||
count(ValidAnswers) > 0 | ||
} | ||
|
||
tests[{ | ||
|
@@ -151,7 +152,8 @@ tests[{ | |
#-- | ||
DomainsWithoutDmarc[DmarcRecord.domain] { | ||
DmarcRecord := input.dmarc_records[_] | ||
not startswith(DmarcRecord.rdata, "v=DMARC1;") | ||
ValidAnswers := [Answer | Answer := DmarcRecord.rdata[_]; startswith(Answer, "v=DMARC1;")] | ||
count(ValidAnswers) == 0 | ||
} | ||
|
||
tests[{ | ||
|
@@ -173,7 +175,8 @@ tests[{ | |
#-- | ||
DomainsWithoutPreject[DmarcRecord.domain] { | ||
DmarcRecord := input.dmarc_records[_] | ||
not contains(DmarcRecord.rdata, "p=reject;") | ||
ValidAnswers := [Answer | Answer := DmarcRecord.rdata[_]; contains(Answer, "p=reject;")] | ||
count(ValidAnswers) == 0 | ||
} | ||
|
||
tests[{ | ||
|
@@ -195,7 +198,8 @@ tests[{ | |
#-- | ||
DomainsWithoutDHSContact[DmarcRecord.domain] { | ||
DmarcRecord := input.dmarc_records[_] | ||
not contains(DmarcRecord.rdata, "mailto:[email protected]") | ||
ValidAnswers := [Answer | Answer := DmarcRecord.rdata[_]; contains(Answer, "mailto:[email protected]")] | ||
count(ValidAnswers) == 0 | ||
} | ||
|
||
tests[{ | ||
|
@@ -217,7 +221,8 @@ tests[{ | |
#-- | ||
DomainsWithoutAgencyContact[DmarcRecord.domain] { | ||
DmarcRecord := input.dmarc_records[_] | ||
count(split(DmarcRecord.rdata, "@")) < 3 | ||
EnoughContacts := [Answer | Answer := DmarcRecord.rdata[_]; count(split(Answer, "@")) >= 3] | ||
count(EnoughContacts) == 0 | ||
} | ||
|
||
tests[{ | ||
|
This file contains 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
Oops, something went wrong.