Skip to content

Commit

Permalink
Added a warning for when the DMARC record specifies more than two rua
Browse files Browse the repository at this point in the history
or ruf URIs.  According to section 6.2 of the RFC
(https://tools.ietf.org/html/rfc7489), receivers are not required to
send reports to more than two URIs.
  • Loading branch information
jsf9k committed Jan 29, 2018
1 parent 0c065c5 commit 05c3a4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trustymail/trustymail.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ def dmarc_scan(resolver, domain):
domain.valid_dmarc = False
elif tag == 'rua' or tag == 'ruf':
uris = tag_dict[tag].split(',')
if len(uris) > 2:
handle_syntax_error('[DMARC]', domain, 'Warning: The {} tag specifies {} URIs. Receivers are not required to send reports to more than two URIs - https://tools.ietf.org/html/rfc7489#section-6.2.'.format(tag, len(uris)))
for uri in uris:
# mailto: is currently the only type of DMARC URI
parsed_uri = parse_dmarc_report_uri(uri)
Expand Down

0 comments on commit 05c3a4a

Please sign in to comment.