File dmarc.cf of Package perl-spamassassin-dmarc

ifplugin Mail::SpamAssassin::Plugin::Dmarc
  ifplugin Mail::SpamAssassin::Plugin::DKIM
    ifplugin Mail::SpamAssassin::Plugin::SPF
      ifplugin Mail::SpamAssassin::Plugin::AskDNS

        dmarc_save_reports 1
        
        askdns __DMARC_HAS_POLICY _dmarc._AUTHORDOMAIN_ TXT /^v=DMARC1;/

        meta __DKIM_FAIL ( DKIM_INVALID )
        meta __SPF_FAIL ( SPF_FAIL || SPF_SOFTFAIL )

        header __DMARC_REJECT eval:check_dmarc_reject()
        meta DMARC_FAIL_POLICY_REJECT ( __DMARC_REJECT )
        describe DMARC_FAIL_POLICY_REJECT Dmarc reject policy
        score DMARC_FAIL_POLICY_REJECT 10

        header __DMARC_QUAR eval:check_dmarc_quarantine()
        meta   DMARC_FAIL_POLICY_QUAR ( __DMARC_QUAR )
        describe DMARC_FAIL_POLICY_QUAR Dmarc quarantine policy
        score DMARC_FAIL_POLICY_QUAR 7

        header __DMARC_NONE eval:check_dmarc_none()
        meta   DMARC_FAIL_POLICY_NONE ( __DMARC_NONE )
        describe DMARC_FAIL_POLICY_NONE Dmarc none policy
        score DMARC_FAIL_POLICY_NONE 0.1

        meta DMARC_PASS __DMARC_HAS_POLICY && !(__DMARC_REJECT || __DMARC_QUAR || __DMARC_NONE)
        score DMARC_PASS -0.01

        meta SPF_AUTH_FAILED !__DMARC_HAS_POLICY && !(__DMARC_REJECT || __DMARC_QUAR || __DMARC_NONE) && __SPF_FAIL && !DKIM_VALID
        score SPF_AUTH_FAILED 7

        meta DKIM_AUTH_FAILED !__DMARC_HAS_POLICY && !(__DMARC_REJECT || __DMARC_QUAR || __DMARC_NONE) && __DKIM_FAIL
        score DKIM_AUTH_FAILED 7

      endif
    endif
  endif
endif