<?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-happel-structured-dynamic-email-00" submissionType="IETF" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true" consensus="true">

<front>
<title>Structured and Dynamic Email</title><seriesInfo value="draft-happel-structured-dynamic-email-00" stream="IETF" status="informational" name="Internet-Draft"></seriesInfo>
<author initials="H.-J." surname="Happel" fullname="Hans-Joerg Happel"><organization>audriga GmbH</organization><address><postal><street></street>
</postal><email>happel@audriga.com</email>
<uri>https://www.audriga.com</uri>
</address></author><date/>
<area>ART</area>
<workgroup>Network Working Group</workgroup>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>Email can be considered a successful technology, based on its broad adoption and based on the fact dozens of email-related RFCs have been written over time <xref target="MailRFCs"></xref>.</t>
<t>Despite of these various RFCs, which are dealing with a multitude of small improvements, the major inner workings of email remain widely unchanged since their inception.</t>
<t>In particular, email is still mostly a text-based medium, which requires a lot of human attention, even though more and more so called &quot;transactional&quot; emails are authored in an automated fashion. Accordingly, the task of dealing with large amounts of email is still a major challenge for many users.</t>
<t>Most existing attempts that have been made to improve this situation focus on particular use cases. The main point of this paper is to suggest that it might be worthwhile to consider if there exists a generalizable core underneath those use cases. Such a more streamlined approach might help to condense specifications and to increase adoption by email servers and clients.</t>
<t>Furthermore, we argue that such an approach might enable novel use cases by leveraging the specific and partially unique properties of email technology, which include:</t>

<ul spacing="compact">
<li>Its ubiquitous and simple approach of addressing</li>
<li>Its asynchronous nature</li>
<li>Its unique role in exchanging data betweeen the public Internet and the private information space of a user</li>
<li>Its established role as a wrapping or transport mechanism for other data</li>
<li>Its widespread support by many tools</li>
</ul>
<t>Essentially, this entails that a consciously designed approach for the automated processing of formally structured information in emails could be considered a &quot;private API&quot; of email users. While this certainly raises security and trust concerns, the opportunities behind such unifying approach seem worthwhile discussing.</t>
</section>

<section anchor="problem-statement"><name>Problem statement</name>

<section anchor="lack-of-structured-data"><name>Lack of structured data</name>
<t>A large share of today's emails is of transactional nature, i.e., sent by automated agents or processes to human users. While those emails often have relatively clear semantics (such as <em>Invoice</em> or <em>Reservation</em>), the medium of those emails is still human-readable text. Users and their email software cannot leverage knowledge inside and about those emails to make their processing a more efficient and enjoyable task.</t>
</section>

<section anchor="lack-of-structured-interaction"><name>Lack of structured interaction</name>
<t>Using informal HTML email conventions, such emails can be considered as small websites, adapted and personalized for a certain use case. However, they are mostly a &quot;dead end&quot; for interaction. Due to the lack of explicit semantics in the underlying email, particular actions afforded by transactional mail (such as <em>Approval</em> or <em>Rating</em>) cannot be easily made actionable for users. Also, many interactions require to switch from email to a regular web browser, resulting in a process disruption which is coined <em>Medienbruch</em> in German language.</t>
</section>

<section anchor="current-solutions"><name>Current solutions</name>
<t>Several attempts have been made to improve this situation. We discuss some of them in the following.</t>
<t>Within the IETF, various RFCs have been devised to structure certain types of email interaction. Probably most notable, iMIP <xref target="RFC2447"></xref> allows users to deal with meeting workflows in a structured manner. Further examples structure interaction with message delivery notifications <xref target="RFC8098"></xref>, mailinglist subscriptions <xref target="RFC8058"></xref> or specify header-based semantic indicators for certain domains <xref target="RFC6477"></xref> or Emoji-based semantics of approval/disapproval in mailinglist discussions <xref target="RFC9078"></xref>.</t>
<t>In more administrative use cases, special kinds of email body parts are used for abuse reporting <xref target="RFC6650"></xref> or administrative reporting <xref target="RFC6522"></xref>. In a USENET context <xref target="RFC1036"></xref>, so-called &quot;control messages&quot; are defined for what can be considered certain API calls, such as for creating a USENET group.</t>
<t>Looking outside the IETF, the &quot;Email Markup&quot; approach <xref target="EMarkup"></xref> by Google allows allows senders to integrate certain Schema.org <xref target="SchemaOrg"></xref> annotations (such as for hotel reservations or  parcel delivery) in their email, such that email clients can provide customized support, including certain easy to use response actions.</t>
<t>Email markup is still in use, but has a number of limitations:</t>

<ul spacing="compact">
<li>Being a proprietary standard owned by Google</li>
<li>It does not support to annotate standard email elements such as headers or attachments</li>
<li>It is supported by only few providers</li>
<li>It is limited to a few fixed use cases</li>
<li>It is only available for senders that went through an approval process</li>
<li>It is not designed for human end users to send structured emails</li>
</ul>
<t>More recently, AMP email <xref target="AMPemail"></xref> (also initiated by Google) and Microsoft Actionable Messages <xref target="AM"></xref> have been specified. Compared to Email Markup, their focus is less on semantically annotating email content, but on more rich interaction, e.g., allowing the submission of simple forms. In addition, both approaches can include dynamic elements, by retrieving certain data, or even replacing the complete email body at reading time.</t>
<t>Both approaches however suffer from similar limitations as those already pointed out for Email Markup. There also seems to be a lack of consensus, since Microsoft Outlook is reported to have removed initial support for AMP email <xref target="OutAMP"></xref>.</t>
</section>

<section anchor="goals"><name>Goals</name>
<t>To summarize, we see a need for a vendor neutral standard for structured and dynamic email. It should enable email senders to provide structured information about the semantics of their message and allow recipients (may it be human users or their agents) for rich and structured interaction with those emails.</t>
<t>Such standard should also take into account the various RFCs specifying email semantics for specific use cases and ideally provide a more generalized framework for such use cases, which can be more consistently and easily implemented by vendors. For example, there exist various &quot;informal&quot; standards for certain types of email messages, that have not yet been standardized in dedicated RFCs, such as <em>out-of-office</em> (aka <em>vacation notice</em>) emails.</t>
</section>
</section>

<section anchor="design-principles"><name>Design principles</name>

<section anchor="protocol-agnostic-implementation"><name>Protocol-agnostic implementation</name>
<t>Structured email should work with existing protocols such as IMAP <xref target="RFC9051"></xref>, SMTP <xref target="RFC5321"></xref>, and novel ones such as JMAP <xref target="RFC8620"></xref>. Accordingly, most extensions would probably realized in the scope of the Internet Message Format <xref target="RFC5322"></xref> or in areas not yet addressed by standardization (see, e.g., <xref target="storage"></xref>, <xref target="context"></xref>, <xref target="discovery"></xref>, <xref target="http"></xref>).</t>
</section>

<section anchor="co-existence-of-approaches"><name>Co-existence of approaches</name>
<t>A major advantage of email technology is the fact, that email is backwards compatible. For example, most HTML emails are accompanied by a plain text version to be used as a fallback in case an email client cannot deal with HTML. In a similar fashion, structured email could be provided as an additional option for clients able and willing to deal with it, thus avoiding a classic &quot;chicken/egg&quot; problem for novel technology.</t>
</section>

<section anchor="decentral-semantics"><name>Decentral semantics</name>
<t>With respect to structured markup, an incremental and decentral approach is proposed. Instead of an authoritative fixed set of schemas, as in the case of Email Markup, users should be allows to create and extend schemas on their own.</t>
</section>
</section>

<section anchor="solution-approach"><name>Solution approach</name>
<t>This draft can and will not yet provide a full specification for the problems stated. In this section, we will single out certain aspects that might be addressed by such specifications.</t>

<section anchor="email-content-body"><name>Email content (body)</name>
<t>As described before, an (optional and alternate) structured description of the semantics of email messages is supposed be in the core of this proposal. While existing approaches such as Email Markup offer different options for how to include structured data, an alternative, machine-readable presentation of the message content in addition to human readable text and HTML representations, might be the most natural approach.</t>
</section>

<section anchor="email-metadata-header"><name>Email metadata (header)</name>
<t>For the sake of efficient processing and perhaps also for reasons of data privacy, certain structured data about an email might also be captured in its headers.</t>
<t>Header fields of certain message parts (such as attachments) might also be enriched by semantic annotation.</t>
</section>

<section anchor="storage"><name>Email storage</name>
<t>Email messages stored in IMAP are currently immutable. Receivers are not supposed to modify their actual content. Hence, the main means to add and store additional data on the receiving side are:</t>

<ul spacing="compact">
<li>IMAP flags</li>
<li>IMAP mailboxes (sorting into folders, which can be considered as some sort of tagging)</li>
<li>Custom data storage on server or email client side</li>
</ul>
<t>As of today, this already yields certain data portability problems - e.g., IMAP flags are often not considered when exporting raw email message files. Accordingly, we see a need for the standardized persistent storage of data which is added by algorithmic processing or by users and their email clients.</t>
</section>

<section anchor="email-filtering"><name>Email filtering</name>
<t>Once emails contain structured data about their content, this might create a demand for related extensions to the Sieve email filtering language <xref target="RFC5228"></xref>.</t>
</section>

<section anchor="context"><name>Email context</name>
<t>Email lives in tight symbiosis with strongly related data such as address books, calendars, or tasks. However, besides specific use cases such as meeting organization, an integration between such data is mainly subject to non-standardized functionality of client software.</t>
<t>Notably, email also operates in a wider context such as services which send transactional emails and also applications running on the same Desktop or Mobile device as the email client.</t>
<t>Transactional emails are sent by services and organizations which are in a relation to the user. Further related data may be managed in outside applications or would be a candidate for being managed within email client software.</t>
<t>From a broader architectural perspective, email can be considered a technology particularly suited to support novel trends in data sovereignty and decentralized data storage, since by design it bridges the public Internet data space with the private data spaces of mailbox users.</t>
<t>Structured email will open new opportunities for exchanging data in all those cases. Accordingly, standards may help to enable and organize interoperability.</t>
</section>

<section anchor="discovery"><name>Discovery</name>
<t>In order to allow users to send structured mails, they need to know if and which kind of structured emails a recipient can process. There might be multiple ways of conveying such information:</t>

<ul spacing="compact">
<li>Headers in emails received from users, which a receiver can store/look up</li>
<li>A DNS/HTTP-based discovery service, which returns structured email capability for a domain or particular sender</li>
</ul>
<t>An example for the latter could be:</t>

<ul spacing="compact">
<li>User selects &quot;john@doe.com&quot; as recipient</li>
<li>Email client checks if discovery service is offered by &quot;doe.com&quot;</li>
<li>Email client queries &quot;doe.com&quot; for structured email capabilities</li>
<li>Discovery service at &quot;doe.com&quot; returns a document which states a number of structured data types or actions that are supported by the &quot;john@doe.com&quot; account</li>
<li>The email client will allow the user to optionally select from those structured interaction options and provide an appropriate user experience</li>
</ul>
</section>

<section anchor="http"><name>HTTP services</name>
<t>For dynamic email features, an endpoint must be available to provide updated data for an email currently read by a user. Similar, if a structured email allows for the execution of a certain action or the submission of form data, there needs to be a receiving endpoint in place. For interoperability reasons, those endpoint APIs should be standardized.</t>
</section>

<section anchor="trust"><name>Trust</name>
<t>Structured and automated interaction certainly raises various security concerns (see <xref target="security"></xref>).</t>
<t>While not the focus of this current draft, we assume that parts of the proposed approach can also be used on a special &quot;trust layer&quot;. E.g., certain structured message exchanges, in combination with signing or encryption could help to establish trust necessary for further structured communication.</t>
</section>
</section>

<section anchor="security"><name>Security considerations</name>
<t>While it is clear that trust, security, and anti-spam considerations are core to the technology suggested in this document, this aspect is not discussed in depth at this stage in order to reduce complexity.</t>
<t>While existing approaches such as Email Markup or Actionable Messages enforce strict control by registration processes, we think that a more open process is better suited for the decentralized character of email.</t>
<t>Various trust mechanisms such as DKIM <xref target="RFC6376"></xref> validation, challenge-response emails, or trusted receivers in address books/white lists might be considered as a prerequisite for structured email processing.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>This document has no IANA actions at this time.</t>
</section>

</middle>

<back>
<references><name>Informative References</name>
<reference anchor="AM" target="https://learn.microsoft.com/en-us/outlook/actionable-messages/">
  <front>
    <title>Actionable Messages</title>
    <author>
      <organization>Microsoft Inc.</organization>
    </author>
    <date></date>
  </front>
</reference>
<reference anchor="AMPemail" target="https://amp.dev/about/email/">
  <front>
    <title>AMP email</title>
    <author>
      <organization>OpenJS Foundation</organization>
    </author>
    <date></date>
  </front>
</reference>
<reference anchor="EMarkup" target="https://developers.google.com/gmail/markup">
  <front>
    <title>Email Markup</title>
    <author>
      <organization>Google Inc.</organization>
    </author>
    <date></date>
  </front>
</reference>
<reference anchor="MailRFCs" target="https://emaillab.jp/mail/mail-rfc/">
  <front>
    <title>MAIL RFCs</title>
    <author fullname="Takashi Takizawa" initials="T." surname="Takizawa"></author>
    <date></date>
  </front>
</reference>
<reference anchor="OutAMP" target="https://www.emailonacid.com/blog/article/industry-news/outlook-turning-off-amp-for-email/">
  <front>
    <title>Outlook is Turning Off AMP for Email</title>
    <author fullname="Kasey Steinbrinck" initials="K." surname="Steinbrinck"></author>
    <date></date>
  </front>
</reference>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1036.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2447.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5228.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.6376.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6477.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6522.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6650.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8058.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8098.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8620.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9051.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9078.xml"/>
<reference anchor="SchemaOrg" target="https://schema.org/">
  <front>
    <title>Schema.org</title>
    <author>
      <organization>W3C Schema.org Community Group</organization>
    </author>
    <date></date>
  </front>
</reference>
</references>

</back>

</rfc>
