DMARC_LOOKUP(1p)

πŸ’– DMARC_LOOKUP ✨

okay bestie, welcome to dmarc_lookup, a 1p-section manual page for the dmarc_lookup command 🫢 she looks up the DMARC policy for a domain. that's the whole vibe. let's get into it πŸ’…


🌸 NAME 🌸

dmarc_lookup β€” look up DMARC policy for a domain πŸ”βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

dmarc_lookup example.com [ --verbose ]

literally that's it. one domain, optional --verbose, iconic πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is query the DNS for a DMARC policy for a (sub)domain 🌐 and then she displays any found results as the DNS record, as a perl object. very demure, very perl πŸ“

in the simplest case β€” like, the case where the domain name in the email From header matches the Organizational Domain β€” 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;

ngl that's basically the same energy, just with more sparkle ✨

BUT. plot twist 😭 when the domain name in the email From header (that's header_from, bestie, remember the name) is not an Organizational Domain (ex: www.example.com), an attempt is made to determine the O.D. using the Mozilla Public Suffix List πŸ“œ and when the O.D. differs from the header_from, a second DNS query is sent to _dmarc.[O.D.]. two queries, one queen, no cap πŸ”₯


🌈 EXAMPLES 🌈

a DMARC record in DNS format looks like this:

v=DMARC1; p=reject; adkim=s; aspf=s; rua=mailto:dmarc@example.com;
pct=100;

DMARC records are stored as TXT resource records in the DNS, at _dmarc.example.com πŸ“Œ

other ways to retrieve a DMARC record for a domain are:

and yeah, the original list of "other ways" is right here β€” it's empty bestie, she said "are:" and then closed the section πŸ’€ (not a typo, that's just what the page says πŸ™ˆ)

πŸ‘€ SEE ALSO πŸ‘€

  • Mail::DMARC::Policy β€” go read that one next, she's the moment πŸ’œ

πŸ’œ AUTHORS πŸ’œ

  • Matt Simerson <msimerson@cpan.org> 🫢
  • Davide Migliavacca <shari@cpan.org> 🌸
  • Marc Bradshaw <marc@marcbradshaw.net> 🧚

and that's the whole page, bestie!! πŸ’– this one's from perl v5.40.1, dated 2026-07-07, and it lives in section DMARC_LOOKUP(1p) πŸŽ€ slay, go look up some DMARC records, periodt πŸ‘‘

πŸ“¦ where this page comes from