Mail::...::DMARC(3pm)

πŸ’Œ Mail::SpamAssassin::Plugin::DMARC β€” like, the check DMARC policy era ✨

okay bestie, so this one lives in the Mail::...::DMARC(3pm) corner of the perl manual-verse (yes, that's the manual name, don't @ me) and it's literally the SpamAssassin plugin that goes "hold up, does this email match the DMARC policy?" πŸ•΅οΈβ™€οΈπŸ’…


🌸 NAME 🌸

Mail::SpamAssassin::Plugin::DMARC β€” the plugin that checks DMARC policy. that's it. that's the name. she's simple, she's iconic. πŸ‘‘


✨ SYNOPSIS ✨

here's the whole vibe, copy it exactly, no cap:

loadplugin Mail::SpamAssassin::Plugin::DMARC

ifplugin Mail::SpamAssassin::Plugin::DMARC
  header DMARC_PASS eval:check_dmarc_pass()
  describe DMARC_PASS DMARC pass policy
  tflags DMARC_PASS net nice
  score DMARC_PASS -0.001

  header DMARC_REJECT eval:check_dmarc_reject()
  describe DMARC_REJECT DMARC reject policy
  tflags DMARC_REJECT net
  score DMARC_REJECT 0.001

  header DMARC_QUAR eval:check_dmarc_quarantine()
  describe DMARC_QUAR DMARC quarantine policy
  tflags DMARC_QUAR net
  score DMARC_QUAR 0.001

  header DMARC_NONE eval:check_dmarc_none()
  describe DMARC_NONE DMARC none policy
  tflags DMARC_NONE net
  score DMARC_NONE 0.001

  header DMARC_MISSING eval:check_dmarc_missing()
  describe DMARC_MISSING Missing DMARC policy
  tflags DMARC_MISSING net
  score DMARC_MISSING 0.001

  header DMARC_PERMERROR eval:check_dmarc_permerror()
  describe DMARC_PERMERROR DMARC permanent error
  tflags DMARC_PERMERROR net
  score DMARC_PERMERROR 0.001

  header DMARC_TEMPERROR eval:check_dmarc_temperror()
  describe DMARC_TEMPERROR DMARC temporary error
  tflags DMARC_TEMPERROR net
  score DMARC_TEMPERROR 0.001
endif

like… look at all those headers. seven of them. she's thorough. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: this plugin checks if emails match DMARC policy, and for that to even work you need both the DKIM plugin and the SPF plugin enabled. both. not one. both. it's giving "two besties or nothing". 😀

okay and here's the part you need to know, bestie πŸ‘‡

If the AuthRes plugin is loaded and it's already parsed a DMARC result out of an Authentication-Results header, then that result gets used instead of doing a local DMARC check with Mail::DMARC::PurePerl. no double work, we're efficient. ✨ but β€” and this is the catch β€” both the result and the published domain policy have to be present in that Authentication-Results header, specifically via the policy.published-domain-policy property. if either one is missing? the plugin just falls back to doing its own Mail::DMARC::PurePerl-based validation. she's got a plan B. always. πŸ’ͺ

πŸŽ€ the options (yes there's basically one, she's low-maintenance) πŸŽ€

  • dmarc_save_reports ( 0 | 1 ) (default: 0) β€” store DMARC reports using Mail::DMARC::Store. and heads up, mail-dmarc.ini must be configured if you actually want to save and send those DMARC reports. no config, no reports. periodt. πŸ’Œ
⚠️ ok tiny reminder bestie: this whole thing needs DKIM and SPF plugins on. don't skip that part, it's not optional, it's the whole plot. 😭

and that's the page!! go forth and check those DMARC policies, you absolute icon 🫢

πŸ’– this lil manual moment was brought to you by perl v5.40.1, dated 2026-07-23, and the lovely humans behind User Contributed Perl Documentation πŸ’–

πŸ“¦ where this page comes from