File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 5.14.1
4+
5+ ### Fixes
6+
7+ - Make the DMARC ` p ` tag required again until DMARCbis is released with an RFC number.
8+
39## 5.14.0
410
511### DMARCbis changes
Original file line number Diff line number Diff line change 1919See the License for the specific language governing permissions and
2020limitations under the License."""
2121
22- __version__ = "5.14.0 "
22+ __version__ = "5.14.1 "
2323
2424OS = platform .system ()
2525OS_RELEASE = platform .release ()
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ class DMARCErrorData(TypedDict, total=False):
434434 },
435435 "p" : {
436436 "name" : "Requested Mail Receiver Policy" ,
437- "required" : False ,
437+ "required" : True ,
438438 "description" : (
439439 "Specifies the policy to "
440440 "be enacted by the "
@@ -1342,11 +1342,12 @@ def parse_dmarc_record(
13421342 if tag not in tags and "default" in dmarc_tags [tag ]:
13431343 tags [tag ] = {"value" : dmarc_tags [tag ]["default" ], "explicit" : False }
13441344 if "p" not in tags :
1345- tags ["p" ] = {"value" : "none" , "explicit" : False }
1346- warnings .append (
1347- "The p tag is optional in DMARCbis, but is required "
1348- "in older versions of DMARC."
1349- )
1345+ raise DMARCSyntaxError ('The record is missing the required policy ("p") tag.' )
1346+ # tags["p"] = {"value": "none", "explicit": False}
1347+ # warnings.append(
1348+ # "A missing p tag is equivalent to p=none in DMARCbis, "
1349+ # "but a p tag is required in older versions of DMARC."
1350+ # )
13501351 tags ["p" ]["value" ] = tags ["p" ]["value" ].lower ()
13511352 if "sp" not in tags :
13521353 tags ["sp" ] = {"value" : tags ["p" ]["value" ], "explicit" : False }
You can’t perform that action at this time.
0 commit comments