<?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-08" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" obsoletes="7489" consensus="true">

<front>
<title abbrev="DMARC Aggregate Reporting">DMARC Aggregate Reporting</title><seriesInfo value="draft-ietf-dmarc-aggregate-reporting-08" 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="2023" month="March" day="25"></date>
<area>Application</area>
<workgroup>DMARC</workgroup>

<abstract>
<t>DMARC allows for domain holders 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 holder's specified destination as supported by the
receiver.</t>
<t>This document (along with others) obsoletes RFC7489.</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>A key component of DMARC is the ability for domain holders to request that
receivers provide various types of reports.  These reports allow domain holders
to have insight into which IP addresses are sending on their behalf, and some
insight into whether or not the volume may be legitimate.  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>In many IETF documents, several words, when they are in all capitals
as shown below, are used to signify the requirements in the
specification.  These capitalized words can bring significant clarity
and consistency to documents because their meanings are well defined.
This document defines how those words are interpreted in IETF
documents when the words are in all capitals.</t>

<ul>
<li><t>These words can be used as defined here, but using them is not
required.  Specifically, normative text does not require the use
of these key words.  They are used for clarity and consistency
when that is what's wanted, but a lot of normative text does not
use them and is still normative.</t>
</li>
<li><t>The words have the meanings specified herein only when they are in
all capitals.</t>
</li>
<li><t>When these words are not capitalized, they have their normal
English meanings and are not affected by this document.</t>
</li>
</ul>
<t>Authors who follow these guidelines should incorporate this phrase
near the beginning of their document:</t>

<artwork>   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 [RFC2119] [RFC8174] when, and only when, they
   appear in all capitals, as shown here.
</artwork>
</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>
<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 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>The report may include the following data:</t>

<ul>
<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 alignment</li>
<li>A separate report should be generated for each Policy Domain encountered during
the reporting period.  If there are multiple 5322.From domains that are included, those
should result in distinct records within the report. See below for further
explanation in &quot;Handling Domains in Reports&quot;.</li>
<li>Sending and receiving domains</li>
<li>The policy requested by the Domain Owner and the policy actually
applied (if different)</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 three primary sections; one consisting
of descriptive information (with two subsections), and the other a set of
IP-focused row-based data.  Each report MUST contain data for only one
Author 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 sub-sections.  One will be the metadata
section which MUST contain the fields related to <tt>org_name</tt>, <tt>email</tt>,
<tt>report_id</tt>, and <tt>date_range</tt>. Optional fields MAY include
<tt>extra_contact_info</tt>, an <tt>error</tt> field.  The <tt>date_range</tt> section which will
note <tt>begin</tt> and <tt>end</tt> values as epoch timestamps. The other sub-section will
be the <tt>policy_published</tt>, and record the policy configuration observed by
the receiving system.  Mandatory fields are <tt>domain</tt>, <tt>p</tt>, <tt>sp</tt>. Optional
fields are <tt>fo</tt>, <tt>adkim</tt>, <tt>aspf</tt>, <tt>testing</tt>, and <tt>discovery_method</tt>.  There
MAY be an optional third section for <tt>extensions</tt>.</t>
<t>Within the data section, the report will contain row(s) of data stating which
IPs were seen to have delivered messages for the Author Domain to the receiving
system.  For each IP that is being reported, there will be at least one <tt>record</tt> element,
which will then have each of a <tt>row</tt>, <tt>identifiers</tt>, and <tt>auth_results</tt>
sub-element.  Within the <tt>row</tt> element, there MUST be <tt>source_ip</tt> and <tt>count</tt>.
There MUST also exist a <tt>policy_evaluated</tt>, with sub-elements of <tt>disposition</tt>,
<tt>dkim</tt>, and <tt>spf</tt>.  There MAY be an element for <tt>reason</tt>, meant to include
any notes the reporter might want to include as to why the <tt>disposition</tt> policy
does not match the <tt>policy_published</tt>, such as a Local Policy override (possible
values listed in Appendix A).  The <tt>dkim</tt> and <tt>spf</tt> 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 <tt>identifiers</tt> element,
there MUST exist the data that was used to apply policy for the given IP. In most
cases, this will be a <tt>header_from</tt> element, which will contain the 5322.From domain
from the message.</t>
<t>There MUST be an <tt>auth_results</tt> element within the 'record' element.  This will
contain the data related to authenticating the messages associated with this sending
IP. The <tt>dkim</tt> sub-element is optional as not all messages are signed, while there
MUST be one <tt>spf</tt> sub-element. These elements MUST have a <tt>domain</tt> that was
used during validation, as well as <tt>result</tt>. The <tt>dkim</tt> element MUST
include a <tt>selector</tt> element that was observed during validation. For the <tt>spf</tt>
element, the <tt>result</tt> element MUST contain a lower-case string where the value
is one of none/neutral/pass/fail/softfail/temperror/permerror.  The <tt>dkim</tt> result
MUST contain a lower-case string where the value is one of
none/pass/fail/policy/neutral/temperror/permerror. Both the <tt>spf</tt> and <tt>dkim</tt> results
may optionally include a <tt>human_readable</tt> field meant for the report to convey
more descriptive information back to the domain holder relating to evaluation
failures. There MAY exist an optional section for <tt>extensions</tt>.</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 5322.From Domains.  Each 5322.From domain will create its own <tt>record</tt>
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 <tt>record</tt>, for
bar.example.com.  The second report would be for example domain contain multiple
<tt>record</tt> elements, one for example.com and one for foo.example.com (and extensibly,
other <tt>record</tt> elements for subdomains which likewise did not have an explicit
DMARC policy declared).</t>
</section>

<section anchor="dkim-signatures-in-aggregate-report"><name>DKIM Signatures in Aggregate Report</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>
<li>A signature that passes DKIM, in strict alignment with the 5322.From domain</li>
<li>A signature that passes DKIM, in relaxed alignment with the 5322.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 <tt>row</tt>, 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 <tt>msg-id</tt>,
<tt>Report-ID</tt>, <tt>unique-id</tt>.  These are the fields that MUST be identical when used.</t>
<t>NOTE, this no longer seems to be the case given changes to the
Report-ID now used in the subject? If we allow &quot;&lt;&gt;&quot; in the Subject,
those characters are illegal in Windows filnames I believe.  We could say
that the &quot;unique-id&quot; and the &quot;ridtxt&quot; are identical, other than the
&quot;&lt;&gt;&quot; characters.  Should/Could we add a MUST to the format?  Could we just
point at RFC4122 (is it still used/valid)?</t>
</section>

<section anchor="data-consistency-in-reporting-github-10"><name>Data Consistency in Reporting (github#10)</name>
<t>Care should be taken by the reporting entity to ensure that the data within
reports is consistent within reason.  For instance, a failure of SPF evaluation
should not result in a DMARC-SPF &quot;pass&quot;. Similarly, if the SPF evaluation does
not align with the 5322.From domain being used in evaluation, the DMARC-SPF
should not result in a &quot;pass&quot;. If a reporter discovers data where there exists
a logical problem with the result, it is likely in the best interests of all
to report this to the report generator.</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>
<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>
<li>generate a report whose end time occurs when the updated policy
was detected, regardless of any requested report interval.</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 and Domain
Owners to be aware of this situation and allow for 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>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>
<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 (see Section 7.2.2) 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>

<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 portion MAY be
   included as a MIME part (such as a text/plain part).</t>
<t>The aggregate data MUST be an XML file that SHOULD be subjected to
   GZIP compression.  Declining to apply compression can cause the
   report to be too large for a receiver to process (a commonly observed
   receiver limit is ten megabytes); 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.</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>

<artwork> mail.receiver.example!example.com!1013662812!1013749130.gz
</artwork>
<t>No specific MIME message structure is required.  It is presumed that
   the aggregate reporting address will be equipped to extract MIME
   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>

<artwork> dmarc-subject = %x52.65.70.6f.72.74 1*FWS       ; &quot;Report&quot;
                 %x44.6f.6d.61.69.6e.3a 1*FWS    ; &quot;Domain:&quot;
                 domain-name 1*FWS               ; from RFC 6376
                 %x53.75.62.6d.69.74.74.65.72.3a ; &quot;Submitter:&quot;
                 1*FWS domain-name 1*FWS
                 %x52.65.70.6f.72.74.2d.49.44.3a ; &quot;Report-ID:&quot;
                 ridtxt / '&lt;' ridtxt '&gt;'         ; defined below
</artwork>
<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 line-wrapped as allowed by <xref target="RFC5322"></xref>:</t>

<artwork> Subject: Report Domain: example.com
     Submitter: mail.receiver.example
     Report-ID: &lt;2002.02.15.1&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.  See Section 7.2.2 for further
   discussion.</t>
<t>Optionally, the report sender MAY choose to use the same <tt>ridtxt</tt>
   as a part or whole of the 5322.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="definition-of-report-id"><name>Definition of Report-ID</name>
<t>As noted elsewhere, this identifier MUST be unique among
reports to the same domain to aid receivers in identifying duplicate reports
should they happen.</t>
<t>ridtxt = (&quot;&lt;&quot; *(ALPHA / DIGIT / &quot;.&quot; / &quot;-&quot;) [&quot;@&quot; <em>(ALPHA / DIGIT / &quot;.&quot; / &quot;-&quot;)] &quot;&gt;&quot;) / (</em>(ALPHA / DIGIT / &quot;.&quot; / &quot;-&quot;) [&quot;@&quot; *(ALPHA / DIGIT / &quot;.&quot; / &quot;-&quot;)])</t>
<t>The format specified here is not very strict as the key goal is uniqueness.</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>
<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; or &quot;ruf&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;<em>report.</em>dmarc&quot;.</t>
</li>
<li><t>Prepend the domain name from which the policy was retrieved,
after conversion to an A-label 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 6.4).  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.</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; or &quot;ruf&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=mailto:reports@red.example.net&quot;, the 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.<em>report.</em>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;*.<em>report.</em>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>
<t>A Mail Receiver might decide not to enact this procedure if, for
example, it relies on a local list of domains for which external
reporting addresses are permitted.</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 <tt>&lt;any&gt;</tt> are provided in the
existing DMARC structure, one at file level, in an <tt>&lt;extension&gt;</tt> element
after <tt>&lt;policy_published&gt;</tt> and one at record level, after <tt>&lt;auth_results&gt;</tt>.
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 <tt>record</tt> 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="data-exposure-considerations"><name>Data Exposure Considerations</name>
<t>Aggregate reports are limited in scope to DMARC policy and
disposition results, to information pertaining to the underlying
authentication mechanisms, and to the identifiers involved in DMARC
validation.</t>
<t>Aggregate report may expose sender and recipient identifiers,
specifically the RFC5322.From addresses.</t>
<t>Domain Owners requesting reports will receive information about mail
claiming to be from them, which includes mail that was not, in fact,
from them.  Information about the final destination of mail where it
might otherwise be obscured by intermediate systems will therefore be
exposed.</t>
<t>When message-forwarding arrangements exist, Domain Owners requesting
reports will also receive information about mail forwarded to domains
that were not originally part of their messages' recipient lists.
This means that destination domains previously unknown to the Domain
Owner may now become visible.</t>
<t>Disclosure of information about the messages is being requested by
the entity generating the email in the first place, i.e., the Domain
Owner and not the Mail Receiver, so this may not fit squarely within
existing privacy policy provisions.  For some providers, aggregate
reporting is viewed as a function similar to complaint reporting
about spamming or phishing and are treated similarly under the
privacy policy.  Report generators (i.e., Mail Receivers) are
encouraged to review their reporting limitations under such policies
before enabling DMARC reporting.</t>
</section>

<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-tkt64"><name>Data Contained Within Reports (Tkt64)</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 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>
<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 are significant.  For non-DMARC
Organizational Domains, all DMARC feedback will be directed to the
PSO.  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.  Feedback
Reports carry more detailed information and present a greater risk.</t>
<t>Due to the inherent privacy and security risks associated with DMARC at the
PSD level for Organizational Domains in multi-organization PSDs that do
not participate in DMARC, any feedback reporting related to multi-
organizational PSDs MUST be limited to non-existent domains except in
cases where the reporter knows that PSO requires use of DMARC.</t>
</section>
</section>

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

<section anchor="appendix-a-dmarc-xml-schema"><name>Appendix A. 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;!--
 org_name: Reporting Organization
 email: Contact to be used when contacting 
     the Reporting Organization
 extra_contact_info: Additional contact details
 report_id: UUID, specified elsewhere
 date_range: Timestamps used when forming report data
 error: ?
--&gt;
&lt;xs:complexType name=&quot;ReportMetadataType&quot;&gt;
 &lt;xs:all&gt;
  &lt;xs:element name=&quot;org_name&quot; type=&quot;xs:string&quot; 
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;email&quot; type=&quot;xs:string&quot; 
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&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;xs:element name=&quot;report_id&quot; type=&quot;xs:string&quot; 
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;date_range&quot; type=&quot;DateRangeType&quot; 
        minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
  &lt;xs:element name=&quot;error&quot; type=&quot;xs:string&quot; 
        minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&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;!-- 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;!-- 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;!-- 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 percent 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;!-- 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;/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;forwarded&quot;/&gt;
  &lt;xs:enumeration value=&quot;sampled_out&quot;/&gt;
  &lt;xs:enumeration value=&quot;trusted_forwarder&quot;/&gt;
  &lt;xs:enumeration value=&quot;mailing_list&quot;/&gt;
  &lt;xs:enumeration value=&quot;local_policy&quot;/&gt;
  &lt;xs:enumeration value=&quot;other&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;((1?\d?\d|2[0-4]\d|25[0-5])\.){3}(1?\d?\d|2[0-4]\d|25[0-5])&quot;/&gt;
  &lt;!-- IPv6 --&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}&quot;/&gt;
  &lt;!-- RFC 5952 zero compression IPv6 (lax) --&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f0-9]{1,4}:){1,7}:&quot;/&gt;
  &lt;xs:pattern value=&quot;([A-Fa-f0-9]{1,4}:){1,6}:[A-Fa-f0-9]{1,4}&quot;/&gt;
  &lt;xs:pattern value=
  &quot;([A-Fa-f0-9]{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 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;!-- The RFC5321.MailFrom domain or, if that value is empty,
       the RFC5321.Helo 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 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;/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;helo&quot;/&gt;
  &lt;xs:enumeration value=&quot;mfrom&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

&lt;!-- SPF result. --&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 least one SPF result. --&gt;
  &lt;xs:element name=&quot;spf&quot; type=&quot;SPFAuthResultType&quot; minOccurs=&quot;1&quot;
        maxOccurs=&quot;unbounded&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;/&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 row 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;
         minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; type=&quot;xs:decimal&quot;/&gt;
   &lt;xs:element name=&quot;report_metadata&quot;
         minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; 
         type=&quot;ReportMetadataType&quot;/&gt;
   &lt;xs:element name=&quot;policy_published&quot;
         minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; 
         type=&quot;PolicyPublishedType&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="appendix-b-sample-report"><name>Appendix B. Sample Report</name>

<sourcecode type="xml">&lt;feedback xmlns=&quot;http://dmarc.org/dmarc-xml/0.2&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;quarantine&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>
</section>

</middle>

<back>
<references><name>Normative References</name>
<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.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.5322.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.7624.xml"/>
</references>

</back>

</rfc>
