Query the DNS for a DMARC policy for a (sub)domain. Displays any found results as the DNS record as a
perl object. In the simplest case, where the domain name in the email From header matches the
OrganizationalDomain, this is roughly equivalent to the following commands:
dig +short _dmarc.example.com TXT
print $_->txtdata."\n"
for Net::DNS::Resolver->new(dnsrch=>0)->send('_dmarc.example.com','TXT')->answer;
When the domain name in the email From header (header_from) is not an Organizational Domain (ex:
www.example.com), an attempt is made to determine the O.D. using the Mozilla Public Suffix List. When the
O.D. differs from the header_from, a second DNS query is sent to _dmarc.[O.D.].