domainaware / checkdmarc

A parser for SPF and DMARC DNS records
https://domainaware.github.io/checkdmarc
Apache License 2.0
251 stars 77 forks source link

Parse RUA and RUF when destination not verified #74

Closed FestiveKyle closed 2 years ago

FestiveKyle commented 2 years ago

Currently if a DMARC report authorization record is not found, the RUA and RUF tag values are not parsed.

rua=mailto:dmarc@unverified.com,mailto:dmarc@verified.com results in:

{ 'rua': { 'value': 'mailto:dmarc@unverified.com,mailto:dmarc@verified.com', 'explicit': True } }

These changes will continue to parse the RUA and RUF tags while still applying warnings, resulting in the normal array format of the rua["value"] property:

{ 'rua': { 'value': [ { 'scheme': 'mailto', 'address': 'dmarc@unverified.com', 'size_limit': None }, { 'scheme': 'mailto', 'address': 'dmarc@verified.com', 'size_limit': None } ], 'explicit': True }