Skip to content

Commit

Permalink
More verbose report URI validation message (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet authored Sep 7, 2023
1 parent 9b74aa4 commit 5dde906
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checkdmarc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,11 @@ def parse_dmarc_report_uri(uri):
mailto_matches = MAILTO_REGEX.findall(uri)
if len(mailto_matches) != 1:
raise InvalidDMARCReportURI(
"{0} is not a valid DMARC report URI".format(uri))
(
"{0} is not a valid DMARC report URI - please make "
"sure that the URI begins with a schema such as mailto:"
).format(uri)
)
match = mailto_matches[0]
scheme = match[0].lower()
email_address = match[1]
Expand Down

0 comments on commit 5dde906

Please sign in to comment.