<?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-duklev-deliveredto-01" submissionType="IETF" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" consensus="true">

<front>
<title abbrev="deliveredto">The Delivered-To Message Header Field</title><seriesInfo value="draft-duklev-deliveredto-01" stream="IETF" status="informational" name="Internet-Draft"></seriesInfo>
<author initials="V." surname="Dukhovni" fullname="Viktor Dukhovni"><organization>Bloomberg LP</organization><address><postal><street></street>
</postal><email>ietf-dane@dukhovni.org</email>
</address></author>
<author initials="J." surname="Levine" fullname="John Levine"><organization>Standcore LLC</organization><address><postal><street></street>
</postal><email>standards@standcore.com</email>
</address></author>
<date/>
<area>Application</area>
<workgroup></workgroup>
<keyword>email</keyword>

<abstract>
<t>This document describes the existing usage of the Delivered-To header field in e-mail messages.</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>The Delivered-To message header field was introduced by the <xref target="qmail"></xref> mail package in 1998,
and adopted shortly afterward by <xref target="Postfix"></xref> and <xref target="Courier"></xref>.
Mail Delivery Agents (MDA) <xref target="RFC5598"></xref> use the header field to detect and break delivery loops.</t>
</section>

<section anchor="header-syntax"><name>Header Field Syntax</name>
<t>The syntax of the Delivered-To header field is similar to other mail message header fields.
In the ABNF below, addr-spec is imported from <xref target="RFC5322"></xref>.</t>

<sourcecode type="abnf">delivered-to = &quot;Delivered-To:&quot; addr-spec CRLF
</sourcecode>
<t>The contents of the header field is an opaque string that is an MDA-specific
representation of the mailbox to which a message was delivered.
The string need not be, and often is not, an address to which mail can be sent using SMTP.</t>
<t>The domain part of the addr-spec is typically a mail domain managed by the MDA
adding the header field, so the header field contents do not collide with header fields created by other MDAs.</t>

<section anchor="loop-breaking"><name>Loop Breaking</name>
<t>Some MDAs use the Delivered-To header field to break delivery loops using the following method.</t>
<t>When an MDA is about to deliver a message, it creates a Delivered-To header field that represents
the target of the delivery, and then scans the existing header fields in the message to
see if an identical Delivered-To header field is already present.
If so, the message is in a loop, and the delivery fails.
If not, the MDA prepends the header field to the message and proceeds with the delivery.</t>
<t>Delivered-To header fields are typically prepended to the message, similarly to the way
trace header fields are prepended, but the loop breaking algorithm does not depend on the
order of the header fields, only whether an identical header field is already present.</t>
</section>
</section>

<section anchor="related-headers"><name>Related Header Fields</name>
<t>Some MDAs add a different header field that records the actual RCPT TO address in an
SMTP or submission session that handled the message.
This header field is often called Envelope-To or X-Original-To, but varies from one
MDA to another.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>IANA is requested to add the following entry to the
Permanent Message Header Field Names registry:</t>
<table>
<thead>
<tr>
<th>Header Field Name</th>
<th>Template</th>
<th>Protocol</th>
<th>Status</th>
<th>Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td>Delivered-To</td>
<td>(blank)</td>
<td>mail</td>
<td>informational</td>
<td>[this document]</td>
</tr>
</tbody>
</table></section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>Depending on the way that an MDA creates the Delivered-To header field, it may be possible
to guess internal details of the delivery process from the contents of the header field.
To avoid this, some MDAs may obscure the Delivered-To contents by hashing or otherwise transforming
the part of contents to the left of the @-sign to make it harder to reverse engineer.</t>
<t>Malicious senders have occasionally sent messages with a Delivered-To header field that deliberately matches
the one to be added by an MDA, to provoke a bounce from that MDA to the envelope sender
of the message, causing what is known as &quot;blowback spam.&quot;
Mitigations are the same as for any undeliverable mail that may have a forged envelope sender address.</t>
</section>

<section anchor="acknowledgments"><name>Acknowledgments</name>
<t>We thank Sam Varshavchik for his reviews and useful suggestions.</t>
</section>

</middle>

<back>
<references><name>Informative References</name>
<reference anchor="Courier" target="https://courier-mta.org">
  <front>
    <title>Courier Mail Server</title>
    <author fullname="Sam Varshavchik" initials="S." surname="Varshavchik">
      <organization></organization>
    </author>
    <date year="2000"></date>
  </front>
</reference>
<reference anchor="Postfix" target="http://www.postfix.org">
  <front>
    <title>Postfix</title>
    <author fullname="Wietse Venema" initials="W." surname="Venema">
      <organization></organization>
    </author>
    <date year="1999"></date>
  </front>
</reference>
<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.5598.xml"/>
<reference anchor="qmail" target="https://cr.yp.to/qmail.html">
  <front>
    <title>qmail</title>
    <author fullname="Dan Bernstein" initials="D.J." surname="Bernstein">
      <organization></organization>
    </author>
    <date year="1998"></date>
  </front>
</reference>
</references>

</back>

</rfc>
