<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-ietf-dmarc-aggregate-reporting-20" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" obsoletes="7489" indexInclude="true" consensus="true">

<front>
<title abbrev="DMARC Aggregate Reporting">Domain-based Message Authentication, Reporting, and Conformance (DMARC) Aggregate Reporting</title><seriesInfo value="draft-ietf-dmarc-aggregate-reporting-20" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author initials="A." surname="Brotman (ed)" fullname="Alex Brotman"><organization>Comcast, Inc.</organization><address><postal><street></street>
</postal><email>alex_brotman@comcast.com</email>
</address></author><date year="2024" month="October" day="10"></date>
<area>Application</area>
<workgroup>DMARC</workgroup>

<abstract>
<t>Domain-based Message Authentication, Reporting, and Conformance
(DMARC) allows for Domain Owners to request aggregate reports from receivers.
This report is an XML document, and contains extensible elements that allow for
other types of data to be specified later.  The aggregate reports can be
submitted to the Domain Owner's specified destination as supported by the
receiver.</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>A key component of DMARC <xref target="I-D.ietf-dmarc-dmarcbis"></xref> is the ability for Domain Owners to
request that receivers provide various types of reports.  These reports allow
Domain Owners to have insight into which IP addresses are sending on their
behalf, and some insight into whether or not the volume may be legitimate.<br />
These reports expose information relating to the DMARC policy, as well as
the outcome of SPF <xref target="RFC7208"></xref> &amp; DKIM <xref target="RFC6376"></xref> validation.</t>

<section anchor="terminology"><name>Terminology</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL
NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;,
&quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when, and only when, they
appear in all capitals, as shown here.</t>
</section>
</section>

<section anchor="dmarc-feedback"><name>DMARC Feedback</name>
<t>Providing Domain Owners with visibility into how Mail Receivers implement
and enforce the DMARC mechanism in the form of feedback is critical to
establishing and maintaining accurate authentication deployments.  When
Domain Owners can see what effect their policies and practices are having,
they are better willing and able to use quarantine and reject policies.</t>

<section anchor="aggregate-reports"><name>Aggregate Reports</name>
<t>The DMARC aggregate feedback report is designed to provide Domain
Owners with precise insight into:</t>

<ul spacing="compact">
<li>authentication results,</li>
<li>corrective action that needs to be taken by Domain Owners, and</li>
<li>the effect of Domain Owner DMARC policy on email streams processed
by Mail Receivers.</li>
</ul>
<t>Aggregate DMARC feedback provides visibility into real-world email
streams that Domain Owners need in order to make informed decisions
regarding the publication of DMARC policy.  When Domain Owners know what
legitimate mail they are sending, what the authentication results are
on that mail, and what forged mail receivers are getting, they can
make better decisions about the policies they need and the steps they
need to take to enable those policies.  When Domain Owners set
policies appropriately and understand their effects, Mail Receivers
can act on them confidently.</t>
<t>Visibility comes in the form of daily (or more frequent) Mail
Receiver-originated feedback reports that contain aggregate data on
message streams relevant to the Domain Owner.  This information
includes data about messages that passed DMARC authentication as well
as those that did not.</t>
<t>A separate report should be generated for each Policy Domain encountered
during the reporting period. See below for further explanation in &quot;Handling
Domains in Reports&quot;.</t>
<t>The report may include the following data:</t>

<ul spacing="compact">
<li>The DMARC policy discovered and applied, if any</li>
<li>The selected message disposition</li>
<li>The identifier evaluated by SPF and the SPF result, if any</li>
<li>The identifier evaluated by DKIM and the DKIM result, if any</li>
<li>For both DKIM and SPF, an indication of whether the identifier was
in DMARC alignment (see [I-D.ietf-dmarc-dmarcbis], Section 3.2.7)</li>
<li>Sending and receiving domains</li>
<li>The number of successful authentications</li>
<li>The counts of messages based on all messages received, even if
their delivery is ultimately blocked by other filtering agents.</li>
</ul>
<t>The format for these reports is defined in Appendix A.</t>
<t>DMARC Aggregate Reports MUST contain two primary sections; one consisting
of descriptive information (with two elements), and the other a set of
IP address-focused row-based data.  Each report MUST contain data for only one
Policy Domain. A single report MUST contain data for one policy configuration.
If multiple configurations were observed during a single reporting period, a
reporting entity MAY choose to send multiple reports, otherwise the reporting
entity SHOULD note only the final configuration observed during the
period. See below for further information.</t>
<t>The informative section MUST contain two elements.  One will be the metadata
section which MUST contain the fields related to &quot;org_name&quot;, &quot;email&quot;,
&quot;report_id&quot;, and &quot;date_range&quot;. Optional fields MAY include
&quot;extra_contact_info&quot;, an &quot;error&quot; field.  The &quot;date_range&quot; field will
contain &quot;begin&quot; and &quot;end&quot; fields as epoch timestamps. The other element will
be the &quot;policy_published&quot;, which will record the policy configuration observed by
the receiving system.  Mandatory fields are &quot;domain&quot;, &quot;p&quot;, &quot;sp&quot;. Optional
fields are &quot;fo&quot;, &quot;adkim&quot;, &quot;aspf&quot;, &quot;testing&quot;, and &quot;discovery_method&quot;.  There
MAY be an optional third section, &quot;extension&quot;.</t>
<t>Within the data section, the report will contain record(s) stating which
IP addresses were seen to have delivered messages for the Author Domain to the receiving
system.  For each IP address that is being reported, there will be at least one &quot;record&quot; element.
Each &quot;record&quot; element will have one &quot;row&quot;, one &quot;identifiers&quot;, and one &quot;auth_results&quot;
sub-element.  Within the &quot;row&quot; element, there MUST be &quot;source_ip&quot; and &quot;count&quot;.
There MUST also exist a &quot;policy_evaluated&quot;, with sub-elements of &quot;disposition&quot;,
&quot;dkim&quot;, and &quot;spf&quot;.  There MAY be an element for &quot;reason&quot;, meant to include
any notes the reporter might want to include as to why the &quot;disposition&quot; policy
does not match the &quot;policy_published&quot;, such as a Local Policy override (See
Section 2.1.5, Policy Override Reason).  The &quot;dkim&quot; and &quot;spf&quot; elements MUST be the
evaluated values as they relate to DMARC, not the values the receiver may
have used when overriding the policy.  Within the &quot;identifiers&quot; element, there
MUST exist the data that was used to apply policy for the given IP address.
There MUST be a &quot;header_from&quot; element, which will contain the RFC5322.From
domain from the message.  There MAY be an optional &quot;envelope_from&quot; element,
which contains the RFC5321.MailFrom domain that the SPF check has been
applied to. This element MAY be existing but empty if the message had a null
reverse-path (<xref target="RFC5321"></xref>, Section 4.5.5). There MAY be an optional
&quot;envelope_to&quot; element, which contains the RFC5321.RcptTo domain from the
message.</t>
<t>There MUST be an &quot;auth_results&quot; element within the &quot;record&quot; element.  This will
contain the data related to authenticating the messages associated with this sending
IP address. There MAY be a number of optional &quot;dkim&quot; sub-elements, one for
each checked DKIM  signature.  There MAY be an optoinal &quot;spf&quot; sub-element.<br />
These elements MUST have a &quot;domain&quot; that was used during validation, as well as
&quot;result&quot;. If validation is attempted for any DKIM signature, the results MUST
be included in the report (within reason, see &quot;DKIM Signatures in Aggregate
Reports&quot; below for handling numerous signatures).  The &quot;dkim&quot; element MUST
include a &quot;selector&quot; element that was observed during validation. For the
&quot;spf&quot; element, the &quot;result&quot; element MUST contain a lower-case string where the value is one of
none/neutral/pass/fail/softfail/temperror/permerror (See <xref target="RFC8601"></xref>).  The &quot;dkim&quot; result
MUST contain a lower-case string where the value is one of
none/pass/fail/policy/neutral/temperror/permerror. Both the &quot;spf&quot; and &quot;dkim&quot; results
may optionally include a &quot;human_readable&quot; field meant for the report to convey
more descriptive information back to the Domain Owner relating to evaluation
failures. There MAY exist an optional section for extensions.</t>

<section anchor="handling-domains-in-reports"><name>Handling Domains in Reports</name>
<t>In the same report, there MUST be a single Policy Domain, though there could be
multiple RFC5322.From Domains.  Each RFC5322.From domain will create its own &quot;record&quot;
within the report.  Consider the case where there are three domains with traffic
volume to report: example.com, foo.example.com, and bar.example.com.  There will be
explicit DMARC records for example.com and bar.example.com, with distinct policies.  There
is no explicit DMARC record for foo.example.com, so it will be reliant on the
policy described for example.com.  For a report period, there would now be two reports.<br />
The first will be for bar.example.com, and contain only one &quot;record&quot;, for
bar.example.com.  The second report would be for example domain contain multiple
&quot;record&quot; elements, one for example.com and one for foo.example.com (and extensibly,
other &quot;record&quot; elements for subdomains which likewise did not have an explicit
DMARC policy declared).</t>
</section>

<section anchor="dkim-signatures-in-aggregate-reports"><name>DKIM Signatures in Aggregate Reports</name>
<t>Within a single message, the possibility exists that there could be multiple DKIM
signatures. When validation of the message occurs, some signatures may pass,
while some may not.  As these pertain to DMARC, and especially to aggregate
reporting, reporters may not find it clear which DKIM signatures they should include
in a report. Signatures, regardless of outcome, could help the report ingester
determine the source of a message. However, there is a preference as to which
signatures are included.</t>

<ol spacing="compact">
<li>A signature that passes DKIM, in strict alignment with the RFC5322.From domain</li>
<li>A signature that passes DKIM, in relaxed alignment with the RFC5322.From domain</li>
<li>Any other DKIM signatures that pass</li>
<li>DKIM signatures that do not pass</li>
</ol>
<t>A report SHOULD contain no more than 100 signatures for a given &quot;row&quot;, in
decreasing priority.</t>
</section>

<section anchor="unique-identifiers-in-aggregate-reporting"><name>Unique Identifiers in Aggregate Reporting</name>
<t>There are a few places where a unique identifier is specified as part of the
body of the report, the subject, and so on.  These unique identifiers should be
consistent per each report.  Specified below, the reader will see a
&quot;Report-ID&quot; and &quot;unique-id&quot;.  These are the fields that MUST be identical when used.</t>
</section>

<section anchor="error-field"><name>Error field</name>
<t>A few examples of information contained within the error field(s):</t>

<ul spacing="compact">
<li>DMARC DNS record evaluation errors (invalid rua or sp, etc.)</li>
<li>Multiple DMARC records at a given location</li>
</ul>
<t>Be mindful that the error field is an unbounded string, but should not contain
an extremely large body.  Provide enough information to assist the domain owner
with understanding some issues with their authentication or DMARC declaration.</t>
</section>

<section anchor="policy-override-reason"><name>Policy Override Reason</name>
<t>The reason element, indicating an override of the DMARC policy, consists of a
mandatory type field and an optional comment field. The type field MUST have
one of the pre-defined values listed below. The comment field is an unbounded
string for providing further details.</t>
<t>Possible values for the policy override type:</t>
<t>&quot;local_policy&quot;: The Mail Receiver's local policy exempted the message
     from being subjected to the Domain Owner's requested policy
     action.</t>
<t>&quot;mailing_list&quot;: Local heuristics determined that the message arrived
     via a mailing list, and thus authentication of the original
     message was not expected to succeed.</t>
<t>&quot;other&quot;: Some policy exception not covered by the other entries in
     this list occurred.  Additional detail can be found in the
     PolicyOverrideReason's &quot;comment&quot; field.</t>
<t>&quot;policy_test_mode&quot;: The message was exempted from application of policy by
     the testing mode (&quot;t&quot; tag) in the DMARC policy record.</t>
<t>&quot;trusted_forwarder&quot;: Message authentication failure was anticipated by
     other evidence linking the message to a locally maintained list of
     known and trusted forwarders.</t>
</section>
</section>

<section anchor="extensions"><name>Extensions</name>
<t>There MAY be optional sections for extensions within the document.
The absence or existence of this section SHOULD NOT create an error when
processing reports. This will be covered in a separate section.</t>
</section>

<section anchor="changes-in-policy-during-reporting-period"><name>Changes in Policy During Reporting Period</name>
<t>Note that Domain Owners or their agents may change the published
DMARC policy for a domain or subdomain at any time.  From a Mail
Receiver's perspective, this will occur during a reporting period and
may be noticed during that period, at the end of that period when
reports are generated, or during a subsequent reporting period, all
depending on the Mail Receiver's implementation.  Under these
conditions, it is possible that a Mail Receiver could do any of the
following:</t>

<ul spacing="compact">
<li>generate for such a reporting period a single aggregate report
that includes message dispositions based on the old policy, or a
mix of the two policies, even though the report only contains a
single &quot;policy_published&quot; element;</li>
<li>generate multiple reports for the same period, one for each
published policy occurring during the reporting period;</li>
</ul>
<t>Such policy changes are expected to be infrequent for any given
domain, whereas more stringent policy monitoring requirements on the
Mail Receiver would produce a very large burden at Internet scale.
Therefore, it is the responsibility of report consumers (i.e., vendors)
and Domain Owners to be aware of this situation and expect such mixed
reports during the propagation of the new policy to Mail Receivers.</t>
</section>

<section anchor="recommended-reporting-periods"><name>Recommended Reporting Periods</name>
<t>Aggregate reports are most useful when they all cover a common time
period.  By contrast, correlation of these reports from multiple
generators when they cover incongruent time periods is difficult or
impossible.  Report generators SHOULD, wherever possible, adhere to
hour boundaries for the reporting period they are using.  For
example, starting a per-day report at 00:00; starting per-hour
reports at 00:00, 01:00, 02:00; etc.  Report generators using a
24-hour report period are strongly encouraged to begin that period at
00:00 UTC, regardless of local timezone or time of report production,
in order to facilitate correlation.</t>
</section>

<section anchor="report-request-discovery"><name>Report Request Discovery</name>
<t>A Mail Receiver discovers reporting requests when it looks up a DMARC
policy record that corresponds to an RFC5322.From domain on received
mail.  The presence of the &quot;rua&quot; tag specifies where to send
feedback.</t>
</section>

<section anchor="transport"><name>Transport</name>
<t>The Mail Receiver, after preparing a report, MUST evaluate the
provided reporting URIs in the order given.  Any reporting URI that
includes a size limitation exceeded by the generated report (after
compression and after any encoding required by the particular
transport mechanism) MUST NOT be used.  An attempt MUST be made to
deliver an aggregate report to every remaining URI, up to the
Receiver's limits on supported URIs.</t>
<t>If transport is not possible because the services advertised by the
published URIs are not able to accept reports (e.g., the URI refers
to a service that is unreachable, or all provided URIs specify size
limits exceeded by the generated record), the Mail Receiver MAY
send a short report indicating that a report is available but could
not be sent.  The Mail Receiver MAY cache that data and try again
later, or MAY discard data that could not be sent.</t>
<t>Where the URI specified in a &quot;rua&quot; tag does not specify otherwise, a
Mail Receiver generating a feedback report SHOULD employ a secure
transport mechanism.</t>

<section anchor="definition-of-report-id"><name>Definition of Report-ID</name>
<t>This identifier MUST be unique among reports to the same domain to
aid receivers in identifying duplicate reports should they happen.</t>

<artwork>ridfmt =  (dot-atom-text [&quot;@&quot; dot-atom-text]) ; from RFC5322

ridtxt =  (&quot;&lt;&quot; ridfmt &quot;&gt;&quot;) / ridfmt
</artwork>
<t>The format specified here is not very strict as the key goal is uniqueness.</t>
</section>

<section anchor="email"><name>Email</name>
<t>The message generated by the Mail Receiver MUST be a <xref target="RFC5322"></xref> message
formatted per <xref target="RFC2045"></xref>.  The aggregate report itself MUST be included
in one of the parts of the message.  A human-readable annotation MAY be
included as a body part (with a human-friendly content-type, such as
&quot;text/plain&quot; or &quot;text/html&quot;).</t>
<t>The aggregate data MUST be an XML file that SHOULD be subjected to
GZIP <xref target="RFC1952"></xref> compression.  Declining to apply compression can cause the
report to be too large for a receiver to process (the total message size
could exceed the receiver SMTP size limit); doing the compression increases
the chances of acceptance of the report at some compute cost.  The
aggregate data MUST be present using the media type &quot;application/
gzip&quot; if compressed (see <xref target="RFC6713"></xref>), and &quot;text/xml&quot; otherwise.  The
filename MUST be constructed using the following ABNF:</t>

<artwork>  filename = receiver &quot;!&quot; policy-domain &quot;!&quot; begin-timestamp
             &quot;!&quot; end-timestamp [ &quot;!&quot; unique-id ] &quot;.&quot; extension

  receiver = domain
             ; imported from [@!RFC5322]

  policy-domain   = domain

  begin-timestamp = 1*DIGIT
                    ; seconds since 00:00:00 UTC January 1, 1970
                    ; indicating start of the time range contained
                    ; in the report

  end-timestamp = 1*DIGIT
                  ; seconds since 00:00:00 UTC January 1, 1970
                  ; indicating end of the time range contained
                  ; in the report

  unique-id = 1*(ALPHA / DIGIT)

  extension = &quot;xml&quot; / &quot;xml.gz&quot;
</artwork>
<t>The extension MUST be &quot;xml&quot; for a plain XML file, or &quot;xml.gz&quot; for an
XML file compressed using GZIP.</t>
<t>&quot;unique-id&quot; allows an optional unique ID generated by the Mail
Receiver to distinguish among multiple reports generated
simultaneously by different sources within the same Domain Owner.  A
viable option may be to explore UUIDs <xref target="RFC9562"></xref>.</t>
<t>If a report generator needs to re-send a report, the system MUST
use the same filename as the original report.  This would
allow the receiver to overwrite the data from the original, or discard
second instance of the report.</t>
<t>For example, this is a sample filename for the gzip file of a
report to the Domain Owner &quot;example.com&quot; from the Mail Receiver
&quot;mail.receiver.example&quot;:</t>
<t>mail.receiver.example!example.com!1013662812!1013749130.xml.gz</t>
<t>No specific MIME message structure is required.  It is presumed that
the aggregate reporting address will be equipped to extract body
parts with the prescribed media type and filename and ignore the
rest.</t>
<t>Email streams carrying DMARC feedback data MUST conform to the DMARC
mechanism, thereby resulting in an aligned &quot;pass&quot; (see Section 3.1).
This practice minimizes the risk of report consumers processing
fraudulent reports.</t>
<t>The RFC5322.Subject field for individual report submissions MUST
conform to the following ABNF:</t>
<t>dmarc-subject = %s&quot;Report&quot; 1*FWS %s&quot;Domain:&quot;
                  1*FWS domain-name 1*FWS         ; policy domain
                  %s&quot;Submitter:&quot; 1*FWS
                  domain-name 1*FWS               ; report generator
                  [ %s&quot;Report-ID:&quot; 1*FWS ridtxt ] ; defined below</t>
<t>The first domain-name indicates the DNS domain name about which the
report was generated.  The second domain-name indicates the DNS
domain name representing the Mail Receiver generating the report.
The purpose of the Report-ID: portion of the field is to enable the
Domain Owner to identify and ignore duplicate reports that might be
sent by a Mail Receiver.</t>
<t>For instance, this is a possible Subject field for a report to the
Domain Owner &quot;example.com&quot; from the Mail Receiver
&quot;mail.receiver.example&quot;.  It is folded as allowed by <xref target="RFC5322"></xref>:</t>

<artwork>  Subject: Report Domain: example.com
      Submitter: mail.receiver.example
      Report-ID: &lt;sample-ridtxt@example.com&gt;
</artwork>
<t>This transport mechanism potentially encounters a problem when
feedback data size exceeds maximum allowable attachment sizes for
either the generator or the consumer.</t>
<t>Optionally, the report sender MAY choose to use the same &quot;ridtxt&quot;
as a part or whole of the RFC5322.Message-Id header included with the report.
Doing so may help receivers distinguish when a message is a re-transmission
or duplicate report.</t>
</section>

<section anchor="other-methods"><name>Other Methods</name>
<t>The specification as written allows for the addition of other
registered URI schemes to be supported in later versions.</t>
</section>

<section anchor="handling-of-duplicates"><name>Handling of Duplicates</name>
<t>There may be a situation where the report generator attempts to deliver
duplicate information to the receiver.  This may manifest as an exact
duplicate of the report, or as duplicate information between two reports.
In these situations, the decision of how to handle the duplicate data
lies with the receiver.  As noted above, the sender MUST use the same
unique identifiers when sending the report.  This allows the receiver to
better understand when duplicates happen.  A few options on how to
handle that duplicate information:</t>

<ul spacing="compact">
<li>Reject back to sender, ideally with a permfail error noting
the duplicate receipt</li>
<li>Discard upon receipt</li>
<li>Inspect the contents to evaluate the timestamps and reported data,
act as appropriate</li>
<li>Accept the duplicate data</li>
</ul>
<t>When accepting the data, that's likely in a situation where it's not
yet noticed, or a one-off experience.  Long term, duplicate data
is not ideal.  In the situation of a partial time frame overlap, there is
no clear way to distinguish the impact of the overlap.  The receiver would
need to accept or reject the duplicate data in whole.</t>
</section>
</section>
</section>

<section anchor="verifying-external-destinations"><name>Verifying External Destinations</name>
<t>It is possible to specify destinations for the different reports that
are outside the authority of the Domain Owner making the request.
This allows domains that do not operate mail servers to request
reports and have them go someplace that is able to receive and
process them.</t>
<t>Without checks, this would allow a bad actor to publish a DMARC
policy record that requests that reports be sent to a victim address,
and then send a large volume of mail that will fail both DKIM and SPF
checks to a wide variety of destinations; the victim will in turn be
flooded with unwanted reports.  Therefore, a verification mechanism
is included.</t>
<t>When a Mail Receiver discovers a DMARC policy in the DNS, and the
Organizational Domain at which that record was discovered is not
identical to the Organizational Domain of the host part of the
authority component of a <xref target="RFC3986"></xref> specified in the &quot;rua&quot; tag,
the following verification steps MUST be taken:</t>

<ol>
<li><t>Extract the host portion of the authority component of the URI.
Call this the &quot;destination host&quot;, as it refers to a Report
Receiver.</t>
</li>
<li><t>Prepend the string &quot;_report._dmarc&quot;.</t>
</li>
<li><t>Prepend the domain name from which the policy was retrieved,
after conversion to an A-label <xref target="RFC5890"></xref> if needed.</t>
</li>
<li><t>Query the DNS for a TXT record at the constructed name.  If the
result of this request is a temporary DNS error of some kind
(e.g., a timeout), the Mail Receiver MAY elect to temporarily
fail the delivery so the verification test can be repeated later.</t>
</li>
<li><t>For each record returned, parse the result as a series of
&quot;tag=value&quot; pairs, i.e., the same overall format as the policy
record (see Section 5.4 in <xref target="I-D.ietf-dmarc-dmarcbis"></xref>).  In
particular, the &quot;v=DMARC1&quot; tag is mandatory and MUST appear
first in the list.  Discard any that do not pass this test. A
trailing &quot;;&quot; is optional.</t>
</li>
<li><t>If the result includes no TXT resource records that pass basic
parsing, a positive determination of the external reporting
relationship cannot be made; stop.</t>
</li>
<li><t>If at least one TXT resource record remains in the set after
parsing, then the external reporting arrangement was authorized
by the Report Receiver.</t>
</li>
<li><t>If a &quot;rua&quot; tag is thus discovered, replace the
corresponding value extracted from the domain's DMARC policy
record with the one found in this record.  This permits the
Report Receiver to override the report destination.  However, to
prevent loops or indirect abuse, the overriding URI MUST use the
same destination host from the first step.</t>
</li>
</ol>
<t>For example, if a DMARC policy query for &quot;blue.example.com&quot; contained
&quot;rua=<eref target="mailto:reports@red.example.net&quot;">mailto:reports@red.example.net"</eref>, the Organizational Domain host
extracted from the latter (&quot;red.example.net&quot;) does not match
&quot;blue.example.com&quot;, so this procedure is enacted.  A TXT query for
&quot;blue.example.com._report._dmarc.red.example.net&quot; is issued.  If a
single reply comes back containing a tag of &quot;v=DMARC1&quot;, then the
relationship between the two is confirmed.  Moreover,
&quot;red.example.net&quot; has the opportunity to override the report
destination requested by &quot;blue.example.com&quot; if needed.</t>
<t>Where the above algorithm fails to confirm that the external
reporting was authorized by the Report Receiver, the URI MUST be
ignored by the Mail Receiver generating the report.  Further, if the
confirming record includes a URI whose host is again different than
the domain publishing that override, the Mail Receiver generating the
report MUST NOT generate a report to either the original or the
override URI.
A Report Receiver publishes such a record in its DNS if it wishes to
receive reports for other domains.</t>
<t>A Report Receiver that is willing to receive reports for any domain
can use a wildcard DNS record.  For example, a TXT resource record at
&quot;*._report._dmarc.example.com&quot; containing at least &quot;v=DMARC1&quot;
confirms that example.com is willing to receive DMARC reports for any
domain.</t>
<t>If the Report Receiver is overcome by volume, it can simply remove
the confirming DNS record.  However, due to positive caching, the
change could take as long as the time-to-live (TTL) on the record to
go into effect.</t>
</section>

<section anchor="extensible-reporting"><name>Extensible Reporting</name>
<t>DMARC reports allow for some extensibility, as defined by future
documents that utilize DMARC as a foundation.  These extensions
MUST be properly formatted XML and meant to exist within the structure
of a DMARC report.  Two positions of type &quot;&lt;any&gt;&quot; are provided in the
existing DMARC structure, one at file level, in an &quot;&lt;extension&gt;&quot; element
after &quot;&lt;policy_published&gt;&quot; and one at record level, after &quot;&lt;auth_results&gt;&quot;.
In either case, the extensions MUST contain a URI to the definition of
the extension so that the receiver understands how to interpret the data.</t>
<t>At file level:</t>

<sourcecode type="xml">&lt;feedback xmlns=&quot;urn:ietf:params:xml:ns:dmarc-2.0&quot;
          xmlns:ext=&quot;URI for an extension-supplied name space&quot;&gt;
  ...
  &lt;policy_published&gt;
    &lt;domain&gt;example.com&lt;/domain&gt;
    &lt;p&gt;quarantine&lt;/p&gt;
    &lt;sp&gt;none&lt;/sp&gt;
    &lt;testing&gt;n&lt;/testing&gt;
  &lt;/policy_published&gt;
  &lt;extension&gt;
    &lt;ext:arc-override&gt;never&lt;/ext:arc-override&gt;
  &lt;/extension&gt;
</sourcecode>
<t>Within the &quot;record&quot; element:</t>

<sourcecode type="xml">  &lt;record&gt;
    &lt;row&gt;
       ...
    &lt;/row&gt;
    &lt;identifiers&gt;
       ...
    &lt;/identifiers&gt;
    &lt;auth_results&gt;
       ...
    &lt;/auth_results&gt;
    &lt;ext:arc-results&gt;
       ...
    &lt;/ext:arc-results&gt;
  &lt;/record&gt;
  &lt;record&gt;
     ...
</sourcecode>
<t>Here &quot;arc-override&quot; and &quot;arc-results&quot; are hypothetical element names
defined in the extension's name space.</t>
<t>Extension elements are optional.  Any number of extensions is allowed.
If a processor is unable to handle an extension in a report, it SHOULD
ignore the data and continue to the next extension.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>This document uses URNs to describe XML namespaces and XML schemas
conforming to a registry mechanism described in <xref target="RFC3688"></xref>.  Two URI
assignments will be registered by the IANA.</t>

<section anchor="registration-request-for-the-dmarc-namespace"><name>Registration request for the DMARC namespace:</name>
<t>URI: urn:ietf:params:xml:ns:dmarc-2.0</t>
<t>Registrant Contact: See the &quot;Author's Address&quot; section of this document.</t>
<t>XML: None.  Namespace URIs do not represent an XML specification.</t>
</section>

<section anchor="registration-request-for-the-dmarc-xml-schema"><name>Registration request for the DMARC XML schema:</name>
<t>URI: urn:ietf:params:xml:schema:dmarc-2.0</t>
<t>Registrant Contact: See the &quot;Author's Address&quot; section of this document.</t>
<t>XML: See Appendix A. DMARC XML Schema in this document.</t>
</section>
</section>

<section anchor="privacy-considerations"><name>Privacy Considerations</name>
<t>This section will discuss exposure related to DMARC aggregate reporting.</t>

<section anchor="report-recipients"><name>Report Recipients</name>
<t>A DMARC record can specify that reports should be sent to an
intermediary operating on behalf of the Domain Owner.  This is done
when the Domain Owner contracts with an entity to monitor mail
streams for abuse and performance issues.  Receipt by third parties
of such data may or may not be permitted by the Mail Receiver's
privacy policy, terms of use, or other similar governing document.
Domain Owners and Mail Receivers should both review and understand if
their own internal policies constrain the use and transmission of
DMARC reporting.</t>
<t>Some potential exists for report recipients to perform traffic
analysis, making it possible to obtain metadata about the Receiver's
traffic.  In addition to verifying compliance with policies,
Receivers need to consider that before sending reports to a third
party.</t>
</section>

<section anchor="data-contained-within-reports"><name>Data Contained Within Reports</name>
<t>Aggregate feedback reports contain aggregated data relating to
messages purportedly originating from the Domain Owner. The data
does not contain any identifying characteristics about individual
users. No personal information such as individual email addresses,
IP addresses of individuals, or the content of any messages, is
included in reports.</t>
<t>Mail Receivers should have no concerns in sending reports as they
do not contain personal information. In all cases, the data within
the reports relates to the domain-level authentication information
provided by mail servers sending messages on behalf of the Domain
Owner. This information is necessary to assist Domain Owners in
implementing and maintaining DMARC.</t>
<t>Domain Owners should have no concerns in receiving reports as
they do not contain personal information. The reports only contain
aggregated data related to the domain-level authentication details
of messages claiming to originate from their domain. This information
is essential for the proper implementation and operation of DMARC.
Domain Owners who are unable to receive reports for organizational
reasons, can choose to exclusively direct the reports to an
external processor.</t>
</section>

<section anchor="leakage"><name>Feedback Leakage</name>
<t>Providing feedback reporting to PSOs for a PSD <xref target="RFC9091"></xref> can, in
some cases, cause information to leak out of an organization to
the PSO.  This leakage could potentially be utilized as part of a
program of pervasive surveillance (see <xref target="RFC7624"></xref>]).  There are
roughly three cases to consider:</t>

<dl spacing="compact">
<dt>Single Organization PSDs (e.g., &quot;.mil&quot;):</dt>
<dd>RUA reports based on PSD DMARC have the potential to
contain information about emails related to entities managed by
the organization.  Since both the PSO and the Organizational
Domain Owners are common, there is no additional privacy risk for
either normal or non-existent domain reporting due to PSD DMARC.</dd>
<dt>Multi-organization PSDs that require DMARC usage (e.g., &quot;.bank&quot;):</dt>
<dd>Reports based on PSD DMARC will only be generated for domains that
do not publish a DMARC policy at the organizational or host level.
For domains that do publish the required DMARC policy records, the
feedback reporting addresses of the organization (or
hosts) will be used.  The only direct risk of feedback leakage for
these PSDs are for Organizational Domains that are out of
compliance with PSD policy.  Data on non-existent cousin domains
would be sent to the PSO.</dd>
<dt>Multi-organization PSDs (e.g., &quot;.com&quot;) that do not mandate DMARC
usage:</dt>
<dd>Privacy risks for Organizational Domains that have not deployed DMARC
within such PSDs can be significant.  For non-DMARC Organizational
Domains, all DMARC feedback will be directed to the PSO if that PSO
itself has a DMARC record that specifies an RUA.  Any non-DMARC
Organizational Domain would have its Feedback Reports redirected to
the PSO.  The content of such reports, particularly for existing
domains, is privacy sensitive.</dd>
</dl>
<t>PSOs will receive feedback on non-existent domains, which may be
similar to existing Organizational Domains.  Feedback related to such
cousin domains have a small risk of carrying information related to
an actual Organizational Domain.  To minimize this potential concern,
PSD DMARC feedback MUST be limited to Aggregate Reports.  Failure
Reports carry more detailed information and present a greater risk.</t>
</section>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>

<ul spacing="compact">
<li>Aggregate reports are supposed to be processed automatically. An attacker might attempt to compromise the integrity or availability of the report processor by sending ill-formed reports. In particular, the archive decompressor and XML parser are at risk to resource exhaustion attacks (zip bomb or XML bomb).</li>
<li>The data contained within aggregate reports may be forged. An attacker might attempt to interfere by submitting false reports in masses.</li>
<li>See also the security considerations of <eref target="Section 11">dmarc-bis</eref> of [I-D.ietf-dmarc-dmarcbis].</li>
</ul>
</section>

</middle>

<back>
<references><name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-dmarc-dmarcbis.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1952.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2045.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5321.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5322.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5890.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6713.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7208.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8601.xml"/>
</references>
<references><name>Informative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7624.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9091.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9562.xml"/>
</references>

<section anchor="dmarc-xml-schema"><name>DMARC XML Schema</name>

<sourcecode type="xsd">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
 targetNamespace=&quot;urn:ietf:params:xml:ns:dmarc-2.0&quot;
 xmlns=&quot;urn:ietf:params:xml:ns:dmarc-2.0&quot;
 elementFormDefault=&quot;qualified&quot;&gt;


&lt;!-- The time range in UTC covered by messages in this report,
     specified in seconds since epoch. --&gt;
&lt;xs:complexType name=&quot;DateRangeType&quot;&gt;
 &lt;xs:all&gt;
  &lt;xs:element name=&quot;begin&quot; type=&quot;xs:integer&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;end&quot; type=&quot;xs:integer&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;


&lt;!-- Report generator metadata. --&gt;
&lt;xs:complexType name=&quot;ReportMetadataType&quot;&gt;
 &lt;xs:all&gt;
  &lt;!-- Reporting Organization --&gt;
  &lt;xs:element name=&quot;org_name&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Contact to be used when contacting the Reporting Organization --&gt;
  &lt;xs:element name=&quot;email&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Additional contact details --&gt;
  &lt;xs:element name=&quot;extra_contact_info&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Unique Report-ID --&gt;
  &lt;xs:element name=&quot;report_id&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Timestamps used when forming report data --&gt;
  &lt;xs:element name=&quot;date_range&quot; type=&quot;DateRangeType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Optional error messages when processing DMARC policy --&gt;
  &lt;xs:element name=&quot;error&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- Alignment mode (relaxed or strict) for DKIM and SPF. --&gt;
&lt;xs:simpleType name=&quot;AlignmentType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;r&quot;/&gt;
  &lt;xs:enumeration value=&quot;s&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- The policy actions specified by p and sp in the DMARC record. --&gt;
&lt;xs:simpleType name=&quot;DispositionType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;none&quot;/&gt;
  &lt;xs:enumeration value=&quot;quarantine&quot;/&gt;
  &lt;xs:enumeration value=&quot;reject&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- The policy actions utilized on messages for this record. --&gt;
&lt;!--
     &quot;none&quot;: No action taken
     &quot;pass&quot;: No action, passing DMARC w/enforcing policy
     &quot;quarantine&quot;: Failed DMARC, message marked for quarantine
     &quot;reject&quot;: Failed DMARC, marked as reject
--&gt;
&lt;xs:simpleType name=&quot;ActionDispositionType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;none&quot;/&gt;
  &lt;xs:enumeration value=&quot;pass&quot;/&gt;
  &lt;xs:enumeration value=&quot;quarantine&quot;/&gt;
  &lt;xs:enumeration value=&quot;reject&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- The methods used to discovery the policy used during
     evaluation.  The available values are &quot;psl&quot; and &quot;treewalk&quot;,
     where &quot;psl&quot; is the method from [@?RFC7489] and the &quot;treewalk&quot;
     is described in [@?RefNeeded]. --&gt;
&lt;xs:simpleType name=&quot;DiscoveryType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;psl&quot;/&gt;
  &lt;xs:enumeration value=&quot;treewalk&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- The published DMARC policy.  Unspecified tags have their
     default values. --&gt;
&lt;xs:complexType name=&quot;PolicyPublishedType&quot;&gt;
 &lt;xs:all&gt;
  &lt;!-- The domain at which the DMARC record was found. --&gt;
  &lt;xs:element name=&quot;domain&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The policy published for messages from the domain. --&gt;
  &lt;xs:element name=&quot;p&quot; type=&quot;DispositionType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The policy published for messages from subdomains. --&gt;
  &lt;xs:element name=&quot;sp&quot; type=&quot;DispositionType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The DKIM alignment mode. --&gt;
  &lt;xs:element name=&quot;adkim&quot; type=&quot;AlignmentType&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The SPF alignment mode. --&gt;
  &lt;xs:element name=&quot;aspf&quot; type=&quot;AlignmentType&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Method used to find/obtain DMARC policy --&gt;
  &lt;xs:element name=&quot;discovery_method&quot; type=&quot;DiscoveryType&quot;
       minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Failure reporting options in effect. --&gt;
  &lt;xs:element name=&quot;fo&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Whether testing mode was declared in the DMARC Record --&gt;
  &lt;xs:element name=&quot;testing&quot; type=&quot;TestingType&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- Values for Testing mode attached to Policy --&gt;
&lt;xs:simpleType name=&quot;TestingType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;n&quot;/&gt;
  &lt;xs:enumeration value=&quot;y&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- The DMARC-aligned authentication result. --&gt;
&lt;xs:simpleType name=&quot;DMARCResultType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;pass&quot;/&gt;
  &lt;xs:enumeration value=&quot;fail&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- Reasons that may affect DMARC disposition or execution thereof. --&gt;
&lt;xs:simpleType name=&quot;PolicyOverrideType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;local_policy&quot;/&gt;
  &lt;xs:enumeration value=&quot;mailing_list&quot;/&gt;
  &lt;xs:enumeration value=&quot;other&quot;/&gt;
  &lt;xs:enumeration value=&quot;policy_test_mode&quot;/&gt;
  &lt;xs:enumeration value=&quot;trusted_forwarder&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- Override reason consists of pre-defined override type and
     free-text comment. --&gt;
&lt;xs:complexType name=&quot;PolicyOverrideReason&quot;&gt;
 &lt;xs:all&gt;
  &lt;xs:element name=&quot;type&quot; type=&quot;PolicyOverrideType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;comment&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- Taking into account everything else in the record,
     the results of applying DMARC. If alignment fails
     and the policy applied does not match the domain's
     configured policy, the reason element MUST be specified --&gt;
&lt;xs:complexType name=&quot;PolicyEvaluatedType&quot;&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name=&quot;disposition&quot; type=&quot;ActionDispositionType&quot;/&gt;
  &lt;xs:element name=&quot;dkim&quot; type=&quot;DMARCResultType&quot;/&gt;
  &lt;xs:element name=&quot;spf&quot; type=&quot;DMARCResultType&quot;/&gt;
  &lt;xs:element name=&quot;reason&quot; type=&quot;PolicyOverrideReason&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;!-- The Internet Protocol Address from which messages were received --&gt;
&lt;xs:simpleType name=&quot;IPAddress&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;!-- IPv4 --&gt;
  &lt;xs:pattern value=
  &quot;((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])&quot;/&gt;
  &lt;!-- IPv6 --&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f\d]{1,4}:){7}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;!-- RFC 5952 zero compression IPv6 (lax) --&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f\d]{1,4}:){1,7}:&quot;/&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f\d]{1,4}:){1,6}:[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;([A-Fa-f\d]{1,4}:){1,5}:[A-Fa-f\d]{1,4}:[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;([A-Fa-f\d]{1,4}:){1,4}:([A-Fa-f\d]{1,4}:){1,2}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;([A-Fa-f\d]{1,4}:){1,3}:([A-Fa-f\d]{1,4}:){1,3}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;([A-Fa-f\d]{1,4}:){1,2}:([A-Fa-f\d]{1,4}:){1,4}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;[A-Fa-f\d]{1,4}::([A-Fa-f\d]{1,4}:){1,5}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=&quot;::([A-Fa-f\d]{1,4}:){1,6}[A-Fa-f\d]{1,4}&quot;/&gt;
  &lt;xs:pattern value=&quot;::[A-Fa-f\d]{1,4}&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;xs:complexType name=&quot;RowType&quot;&gt;
 &lt;xs:sequence&gt;
  &lt;!-- The connecting IP. --&gt;
  &lt;xs:element name=&quot;source_ip&quot; type=&quot;IPAddress&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The number of messages for which the
       PolicyEvaluatedType was applied. --&gt;
  &lt;xs:element name=&quot;count&quot; type=&quot;xs:integer&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The DMARC disposition applied to matching messages. --&gt;
  &lt;xs:element name=&quot;policy_evaluated&quot; type=&quot;PolicyEvaluatedType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name=&quot;IdentifierType&quot;&gt;
 &lt;xs:all&gt;
  &lt;!-- The RFC5322.From domain. --&gt;
  &lt;xs:element name=&quot;header_from&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The RFC5321.MailFrom domain --&gt;
  &lt;xs:element name=&quot;envelope_from&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The envelope recipient domain. --&gt;
  &lt;xs:element name=&quot;envelope_to&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- DKIM verification result, according to RFC 8601 Section 2.7.1. --&gt;
&lt;xs:simpleType name=&quot;DKIMResultType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;none&quot;/&gt;
  &lt;xs:enumeration value=&quot;pass&quot;/&gt;
  &lt;xs:enumeration value=&quot;fail&quot;/&gt;
  &lt;xs:enumeration value=&quot;policy&quot;/&gt;
  &lt;xs:enumeration value=&quot;neutral&quot;/&gt;
  &lt;xs:enumeration value=&quot;temperror&quot;/&gt;
  &lt;xs:enumeration value=&quot;permerror&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;xs:complexType name=&quot;DKIMAuthResultType&quot;&gt;
 &lt;xs:all&gt;
  &lt;!-- The &quot;d=&quot; parameter in the signature. --&gt;
  &lt;xs:element name=&quot;domain&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The &quot;s=&quot; parameter in the signature. --&gt;
  &lt;xs:element name=&quot;selector&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The DKIM verification result. --&gt;
  &lt;xs:element name=&quot;result&quot; type=&quot;DKIMResultType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Any extra information (e.g., from Authentication-Results). --&gt;
  &lt;xs:element name=&quot;human_result&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- SPF domain scope. --&gt;
&lt;xs:simpleType name=&quot;SPFDomainScope&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;mfrom&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- SPF verification result, according to RFC 7208 Section 2.6. --&gt;
&lt;xs:simpleType name=&quot;SPFResultType&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:enumeration value=&quot;none&quot;/&gt;
  &lt;xs:enumeration value=&quot;neutral&quot;/&gt;
  &lt;xs:enumeration value=&quot;pass&quot;/&gt;
  &lt;xs:enumeration value=&quot;fail&quot;/&gt;
  &lt;xs:enumeration value=&quot;softfail&quot;/&gt;
  &lt;!-- &quot;TempError&quot; commonly implemented as &quot;unknown&quot;. --&gt;
  &lt;xs:enumeration value=&quot;temperror&quot;/&gt;
  &lt;!-- &quot;PermError&quot; commonly implemented as &quot;error&quot;. --&gt;
  &lt;xs:enumeration value=&quot;permerror&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;xs:complexType name=&quot;SPFAuthResultType&quot;&gt;
 &lt;xs:all&gt;
  &lt;!-- The checked domain. --&gt;
  &lt;xs:element name=&quot;domain&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The scope of the checked domain. --&gt;
  &lt;xs:element name=&quot;scope&quot; type=&quot;SPFDomainScope&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- The SPF verification result. --&gt;
  &lt;xs:element name=&quot;result&quot; type=&quot;SPFResultType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Any extra information (e.g., from Authentication-Results).
       The information in the field below should be for a
       person to be provided with additional information
       that may be useful when debugging SPF authentication
       issues.  This could include broken records, invalid
       DNS responses, etc. --&gt;
  &lt;xs:element name=&quot;human_result&quot; type=&quot;xs:string&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;!-- This element contains DKIM and SPF results, uninterpreted
     with respect to DMARC. --&gt;
&lt;xs:complexType name=&quot;AuthResultType&quot;&gt;
 &lt;xs:sequence&gt;
  &lt;!-- There may be no DKIM signatures, or multiple DKIM signatures. --&gt;
  &lt;xs:element name=&quot;dkim&quot; type=&quot;DKIMAuthResultType&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
  &lt;!-- There will always be at most one SPF result. --&gt;
  &lt;xs:element name=&quot;spf&quot; type=&quot;SPFAuthResultType&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;!-- This element contains all the authentication results that
     were evaluated by the receiving system for the given set of
     messages. --&gt;
&lt;xs:complexType name=&quot;RecordType&quot;&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name=&quot;row&quot; type=&quot;RowType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;identifiers&quot; type=&quot;IdentifierType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;auth_results&quot; type=&quot;AuthResultType&quot;
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;!-- Extension at record level --&gt;
  &lt;xs:any processContents=&quot;lax&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name=&quot;ExtensionType&quot;&gt;
 &lt;xs:sequence&gt;
  &lt;xs:any processContents=&quot;lax&quot;
        minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;!-- Parent --&gt;
&lt;xs:element name=&quot;feedback&quot;&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name=&quot;version&quot; type=&quot;xs:decimal&quot;
         minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
   &lt;xs:element name=&quot;report_metadata&quot; type=&quot;ReportMetadataType&quot;
         minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
   &lt;xs:element name=&quot;policy_published&quot; type=&quot;PolicyPublishedType&quot;
         minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
   &lt;!-- Extension at top level --&gt;
   &lt;xs:element name=&quot;extension&quot; type=&quot;ExtensionType&quot;
         minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
   &lt;!-- One record per (IP, result, IDs Auths) tuples --&gt;
   &lt;xs:element name=&quot;record&quot; type=&quot;RecordType&quot;
         minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;/xs:schema&gt;
</sourcecode>
</section>

<section anchor="sample-report"><name>Sample Report</name>

<sourcecode type="xml">&lt;feedback xmlns=&quot;urn:ietf:params:xml:ns:dmarc-2.0&quot;&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;report_metadata&gt;
    &lt;org_name&gt;Sample Reporter&lt;/org_name&gt;
    &lt;email&gt;report_sender@example-reporter.com&lt;/email&gt;
    &lt;extra_contact_info&gt;...&lt;/extra_contact_info&gt;
    &lt;report_id&gt;3v98abbp8ya9n3va8yr8oa3ya&lt;/report_id&gt;
    &lt;date_range&gt;
      &lt;begin&gt;161212415&lt;/begin&gt;
      &lt;end&gt;161221511&lt;/end&gt;
    &lt;/date_range&gt;
  &lt;/report_metadata&gt;
  &lt;policy_published&gt;
    &lt;domain&gt;example.com&lt;/domain&gt;
    &lt;p&gt;quarantine&lt;/p&gt;
    &lt;sp&gt;none&lt;/sp&gt;
    &lt;testing&gt;n&lt;/testing&gt;
    &lt;discovery_method&gt;treewalk&lt;/discovery_method&gt;
  &lt;/policy_published&gt;
  &lt;record&gt;
    &lt;row&gt;
      &lt;source_ip&gt;192.168.4.4&lt;/source_ip&gt;
      &lt;count&gt;123&lt;/count&gt;
      &lt;policy_evaluated&gt;
        &lt;disposition&gt;pass&lt;/disposition&gt;
        &lt;dkim&gt;pass&lt;/dkim&gt;
        &lt;spf&gt;fail&lt;/spf&gt;
      &lt;/policy_evaluated&gt;
    &lt;/row&gt;
    &lt;identifiers&gt;
      &lt;envelope_from&gt;example.com&lt;/envelope_from&gt;
      &lt;header_from&gt;example.com&lt;/header_from&gt;
    &lt;/identifiers&gt;
    &lt;auth_results&gt;
      &lt;dkim&gt;
        &lt;domain&gt;example.com&lt;/domain&gt;
        &lt;result&gt;pass&lt;/result&gt;
        &lt;selector&gt;abc123&lt;/selector&gt;
      &lt;/dkim&gt;
      &lt;spf&gt;
        &lt;domain&gt;example.com&lt;/domain&gt;
        &lt;result&gt;fail&lt;/result&gt;
      &lt;/spf&gt;
    &lt;/auth_results&gt;
  &lt;/record&gt;
&lt;/feedback&gt;
</sourcecode>
<t>Acknowledgements</t>
<t>TBD</t>
</section>

</back>

</rfc>
