<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-blanchet-dtn-email-over-bp-00"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
    <title abbrev="Email over Bundle Protocol">Encapsulation of Email over Delay-Tolerant Networks(DTN) using the Bundle Protocol</title>
    <seriesInfo name="Internet-Draft" value="draft-blanchet-dtn-email-over-bp-00"/>
    <author fullname="Marc Blanchet" initials="MB">
      <address>
        <email>marc.blanchet@viagenie.ca</email>  
      </address>
    </author>
    <date year="2023"/> 
    <area>Transport</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>rfc822</keyword>
    <keyword>dtn</keyword>
    <keyword>email</keyword>
    <keyword>bundle</keyword>
    <abstract>
      <t>This document describes the encapsulation of emails using RFC5322 format in the payload of bundles of the Bundle Protocol for the use case of Delay-Tolerant Networks(DTN) such as in space communications.</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>An important use case of Delay-Tolerant Networks(DTN) using the Bundle Protocol<xref target="RFC9171"/> is in space communications. Current scenarios by space agencies involves the use of an IP network on the planetary body and the use of the Bundle Protocol between planetary bodies, including Earth. Therefore, there are IP endpoints at both ends, and then bundles could be used as a transport of Internet related application payload. This document describes the encapsulation of emails over bundles so that end-users on the remote end (aka on a planetary body such as Moon or Mars) or processes can use typical Internet Email software and tools to use emails,  while the emails when transiting in space is encapsulated into bundles of the Bundle Protocol. </t>
      <t>It should be noted that in DTNs, delays may be very large compared to normal delays on (Earth) Internet. Therefore, the SMTP <xref target="RFC5321"/> "conversation" between the two SMTP peers should be avoided since it will take many round-trips over long delays networks to achieve the delivery. Therefore, this document proposes to encapsulate the whole Email using the Internet Message Format<xref target="RFC5322"/> as a single file into bundles of the Bundle Protocol.</t>
      <section anchor="requirements">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
          interpreted as described in BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
      <section>
          <name>Vocabulary</name>
            <ul>
                <li>Internet: identifies the global IP network on Earth as we know it</li>
                <li>Planetary body: describes Moon, Mars and others. In this document, we only care about ones that would have some IP networking installed</li>
            </ul>
          </section>
    </section>
    <section>
        <name>Description</name>
        <t>In a typical scenario, the email would be created on (Earth) Internet, sent using regular delivery (DNS MX records, SMTP, ...) to a destination address that points to a location on a planetary body. That email would arrive to an SMTP server which is connected to the Bundle agent<xref target="RFC9171"/> capable of routing bundles to the final Bundle agent on the other planetary body, who has also a connection to an SMTP server. That SMTP server on the other planetary body is responsible for final delivery on that planetary body network. The target bundle protocol service number contained in the bundle is the one allocated by IANA per this document.</t>
        <t>TBD: artwork representation</t>
        <t>This document assumes that there is a close interaction between a Mail Transfer Agent(MTA) and a Bundle protocol agent, in, for example, the form of interprocess communication. However, the specific interaction is outside the scope of this document and is left to the implementation.</t>
    </section>
    <section>
      <name>Encapsulation</name>
      <t>The payload of the bundle <xref target="RFC9171"/> is an Internet Message Format <xref target="RFC5322"/>. A bundle can only contain a single email.</t>
      <t>If the email is too large to fit in a single bundle, then the bundle agent uses bundle fragmentation as described in section 5.8 of RFC9171 to slice the email into multiple bundles. It is the responsability of the receiving bundle agent to properly reassemble the multiple bundle payloads into the source email.</t>
     <t>The receiving bundle agent will receive the email-containing bundle(s) on this document specifically assigned IANA service number. The agent transfers the email in <xref target="RFC5322"/> format to a Mail Transfer Agent(MTA) that will deliver to the appropriate location as normal practice on Internet.</t>
    </section>
    <section>
      <name>Considerations</name>
      <t>Configuring and deploying an isolated IP network on a planetary body with local mail servers, DNS servers and email client needs careful consideration. For example, emails sent between two end-users on the same planetary body should not go through space links down to Earth and back to the planetary body. This operational consideration is not described here and is outside the scope of this document.</t>
      <t>By using the encapsulation of emails using the <xref target="RFC5322"/> format, there is no negotiation and no declaration of capabilities as it is done in normal SMTP<xref target="RFC5321"/>. Therefore, the source endpoint has no way by this solution to know the capabilities of the other endpoint. Therefore, on the target planetary bodies MTAs should be properly configured to receive the appropriate kind of emails sent from another planetary body. As with SMTP, it is very possible that either improper configuration or other reasons cause the destination MTA to reject the email. In this case, it should send an error using the same technique on the reverse path, if at least the From address is parsable. If the email is not parsable on the destination MTA, then normal operational logging shall be used. Similarly to the previous paragraph, this consideration of non-negotiation of capabilities is not described here and is outside the scope of this document. It is however expected that this environment will be highly configured and managed ans such issues shall not be typical.</t>
   </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>This document requests IANA to allocate a new Bundle Protocol service number under the current CBHE Service Numbers and assign it to this document. Description should be: "RFC5322 content (aka Email)"</t>
      <t>Note to IANA (to be removed by the RFC editor): prefer 25 to relate to the Internet email service, but not a big deal if not.</t>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>Sending any payload with bad data over a space link is a somewhat DOS attack. It is expected that this environment will be highly managed and controlled, therefore, before a bundle is sent, the payload is properly verified and access control to the space network will be tightly controlled.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5322.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9171.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5321.xml"/>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>
 </back>
</rfc>
