<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" >

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc strict="yes" ?>
<?rfc toc="no"?>
<?rfc tocdepth="2"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>


<rfc
   category="std"
   docName="draft-ietf-yam-rfc1652bis-03"
   ipr="trust200902"
   obsoletes="1652">

   <front>

      <title
         abbrev="SMTP 8-bit Extension">SMTP Service Extension for 8-bit MIME
         Transport</title>

      <author
         fullname="John C Klensin"
         initials="J.C."
         surname="Klensin">
         <address>
        <postal>
          <street>1770 Massachusetts Ave, Ste 322</street>
          <city>Cambridge</city> <region>MA</region>
          <code>02140</code>
          <country>USA</country>
        </postal>
        <phone>+1 617 245 1457</phone>
        <email>john+ietf@jck.com</email>
      </address>
      </author>

      <author
         fullname="Ned Freed"
         initials="N."
         surname="Freed">
         <organization>Sun Microsystems</organization>
         <address>
           <postal>
              <street>800 Royal Oaks</street>
              <city>Monrovia</city> <region>CA</region>  <code>91016-6347</code>
              <country>USA</country>
           </postal>
            <phone>+1 909 457 4293</phone>
            <email>ned.freed@mrochek.com</email>
         </address>
      </author>

      <author
         fullname="M. Rose"
         initials="M."
         surname="Rose">
         <organization>Dover Beach Consulting, Inc.</organization>
         <address>
            <postal>
               <street>POB 255268</street>
               <city>Sacramento</city>
               <code>95865-5268</code>
               <region>CA</region>
            </postal>
            
            <phone>+1 916 538 2535</phone>
            <email>mrose17@gmail.com</email>
           
         </address>
      </author>

      <author
         fullname="D. Crocker"
         initials="D."
         role="editor"
         surname="Crocker">
         <organization>Brandenburg InternetWorking</organization>
         <address>
           <postal>
              <street>675 Spruce Dr.</street>
              <region>CA</region>
              <city>Sunnyvale</city>
              <country>USA</country>
              </postal>
            <phone>+1.408.246.8253</phone>
            <email>dcrocker@bbiw.net</email>
            <uri>http://bbiw.net</uri>
      </address>
      </author>

      <date
         year="2010" />

      <workgroup>YAM</workgroup>

      <abstract>
         <t>This memo defines an extension to the SMTP service whereby an SMTP
            content body consisting of text containing octets outside of the US-
            ASCII octet range (hex 00-7F) may be relayed using SMTP.</t>
      </abstract>

   </front>

   <middle>

      <section
         title="Introduction">
         <t>Although SMTP is widely and robustly deployed, various extensions
            have been requested by parts of the Internet community. In
            particular, a significant portion of the Internet community wishes
            to exchange messages in which the content body consists of a MIME
            message <xref
               target="RFC2045" /><xref
               target="RFC2046" /><xref
               target="RFC5322" /> containing arbitrary octet-aligned material.
            This memo uses the mechanism described in <xref
               target="RFC5321" /> to define an extension to the SMTP service
            whereby such contents may be exchanged. Note that this extension
            does NOT eliminate the possibility of an SMTP server limiting line
            length; servers are free to implement this extension but
            nevertheless set a line length limit no lower than 1000 octets.
            Given that this restriction still applies, this extension does NOT
            provide a means for transferring unencoded binary via SMTP.</t>
      </section>

      <section
         anchor="param"
         title="Framework for the 8bit MIME Transport Extension">
         <t>The 8bit MIME transport extension is laid out as follows: <list
               style="numbers">
               <t>the name of the SMTP service extension defined here is
                  8bit-MIMEtransport;</t>
               <t>the EHLO keyword value associated with the extension is
                  8BITMIME;</t>
               <t>no parameter is used with the 8BITMIME EHLO keyword;</t>
               <t>one optional parameter using the keyword BODY is added to the
                  MAIL FROM command. The value associated with this parameter is
                  a keyword indicating whether a 7bit message (in strict
                  compliance with <xref
                     target="RFC5321" />) or a MIME message (in strict
                  compliance with <xref
                     target="RFC2046" /><xref
                     target="RFC2045" />) with arbitrary octet content is being
                  sent. The syntax of the value is as follows, using the ABNF
                  notation of <xref
                     target="RFC5234" />: <figure>
                     <artwork><![CDATA[body-value = "7BIT" / "8BITMIME"]]></artwork>
                  </figure></t>
               <t>no additional SMTP verbs are defined by this extension;
                  and,</t>
               <t>the next section specifies how support for the extension
                  affects the behavior of a server and client SMTP.</t>
            </list></t>
      </section>

      <section
         title="The 8bit-MIMEtransport service extension">
         <t>When a client SMTP wishes to submit (using the MAIL command) a
            content body consisting of a MIME message containing arbitrary lines
            of octet-aligned material, it first issues the EHLO command to the
            server SMTP. If the server SMTP responds with code 250 to the EHLO
            command, and the response includes the EHLO keyword value 8BITMIME,
            then the server SMTP is indicating that it supports the extended
            MAIL command and will accept MIME messages containing arbitrary
            octet- aligned material.</t>

         <t>The extended MAIL command is issued by a client SMTP when it wishes
            to transmit a content body consisting of a MIME message containing
            arbitrary lines of octet-aligned material. The syntax for this
            command is identical to the MAIL command in <xref
               target="RFC5321" />, except that a BODY parameter must appear
            after the address. Only one BODY parameter may be used in a single
            MAIL command. </t>


         <t>The complete syntax of this extended command is defined in <xref
               target="RFC5321" />. The esmtp-keyword is BODY and the syntax for
            esmtp-value is given by the syntax for body-value shown above.</t>

         <t>The value associated with the BODY parameter indicates whether the
            content body which will be passed using the DATA command consists of
            a MIME message containing some arbitrary octet-aligned material
            ("8BITMIME") or is encoded entirely in accordance with <xref
               target="RFC5321" /> ("7BIT"). </t>
         <t>A server which supports the 8-bit MIME transport service extension
            shall preserve all bits in each octet passed using the DATA command.
            Naturally, the usual SMTP data-stuffing algorithm applies so that a
            content which contains the five-character sequence of <figure>
               <artwork><![CDATA[<CR> <LF> <DOT> <CR> <LF>]]></artwork>
            </figure> or a content that begins with the three-character sequence
            of <figure>
               <artwork><![CDATA[<DOT> <CR> <LF>]]></artwork>
            </figure> does not prematurely terminate the transfer of the
            content. Further, it should be noted that the CR-LF pair immediately
            preceding the final dot is considered part of the content. Finally,
            although the content body contains arbitrary lines of octet-aligned
            material, the length of each line (number of octets between two
            CR-LF pairs), is still subject to SMTP server line length
            restrictions (which can allow as few as 1000 octets, inclusive of
            the CR-LF pair, on a single line). This restriction means that this
            extension provides the necessary facilities for transferring a MIME
            object with the 8BIT content-transfer-encoding, it DOES NOT provide
            a means of transferring an object with the BINARY
            content-transfer-encoding. </t>

         <t>Once a server SMTP supporting the 8bit-MIMEtransport service
            extension accepts a content body containing octets with the high-
            order (8th) bit set, the server SMTP must deliver or relay the
            content in such a way as to preserve all bits in each octet.</t>

         <t>If a server SMTP does not support the 8-bit MIME transport extension
            (either by not responding with code 250 to the EHLO command, or by
            not including the EHLO keyword value 8BITMIME in its response), then
            the client SMTP must not, under any circumstances, attempt to
            transfer a content which contains characters outside the US-ASCII
            octet range (hex 00-7F).</t>

         <t>A client SMTP has two options in this case: first, it may implement
            a gateway transformation to convert the message into valid 7bit
            MIME, or second, or may treat this as a permanent error and handle
            it in the usual manner for delivery failures. The specifics of the
            transformation from 8bit MIME to 7bit MIME are not described by this
            RFC; the conversion is nevertheless constrained in the following
            ways: <list
               style="numbers">
               <t>it must cause no loss of information; MIME transport encodings
                  must be employed as needed to insure this is the case, and</t>
               <t>the resulting message must be valid 7bit MIME.</t>
            </list></t>
      </section>


      <section
         title="Usage Example">
         <t>The following dialogue illustrates the use of the 8bit-MIMEtransport
            service extension: <figure>
               <artwork><![CDATA[S: <wait for connection on TCP port 25>
C: <open connection to server>
S: 220 dbc.mtview.ca.us SMTP service ready
C: EHLO ymir.claremont.edu
S: 250-dbc.mtview.ca.us says hello
S: 250 8BITMIME
C: MAIL FROM:<ned@ymir.claremont.edu> BODY=8BITMIME
S: 250 <ned@ymir.claremont.edu>... Sender and 8BITMIME ok
C: RCPT TO:<mrose@dbc.mtview.ca.us>
S: 250 <mrose@dbc.mtview.ca.us>... Recipient ok
C: DATA
S: 354 Send 8BITMIME message, ending in CRLF.CRLF.
 ...
C: .
S: 250 OK
C: QUIT
S: 250 Goodbye]]></artwork>
            </figure></t>
      </section>


      <section
         title="Security Considerations">
         <t>This RFC does not discuss security issues and is not believed to
            raise any security issues not already endemic in electronic mail and
            present in fully conforming implementations of <xref
               target="RFC5321" />.</t>
      </section>

      <section
         title="IANA Considerations">

         <section
            title="SMTP service extension registration">

            <t>This document defines an SMTP and Submit service extension, and
               IANA is asked to update the 8BITMIME entry in the SMTP Service
               Extensions registry, as follows: <list
                  style="hanging">
                  <t
                     hangText="Keyword: ">8BITMIME</t>
                  <t
                     hangText="Description: ">SMTP and Submit transport of 8bit
                     MIME content </t>
                  <t
                     hangText="Reference: ">[[IANA: Insert this RFC
                     number.]]</t>
                  <t
                     hangText="Parameters: ">See <xref
                        target="param" /> in this specification.</t>
               </list></t>

         </section>

         <section
            title="Acknowledgements">
            <t>E. Stefferud was an original author. This version of the
               specification was produced by the YAM working group.</t>
            <t>
               <list
                  style="hanging">
                  <t
                     hangText="Original acknowledgements:  ">This document
                     represents a synthesis of the ideas of many people and
                     reactions to the ideas and proposals of others. Randall
                     Atkinson, Craig Everhart, Risto Kankkunen, and Greg
                     Vaudreuil contributed ideas and text sufficient to be
                     considered co-authors. Other important suggestions, text,
                     or encouragement came from Harald Alvestrand, Jim Conklin,
                     Mark Crispin, Frank da Cruz, 'Olafur Gudmundsson, Per
                     Hedeland, Christian Huitma, Neil Katin, Eliot Lear, Harold
                     A. Miller, Keith Moore, Dan Oscarsson, Julian Onions, Neil
                     Rickert, John Wagner, Rayan Zachariassen, and the
                     contributions of the entire IETF SMTP Working Group. Of
                     course, none of the individuals are necessarily responsible
                     for the combination of ideas represented here. Indeed, in
                     some cases, the response to a particular criticism was to
                     accept the problem identification but to include an
                     entirely different solution from the one originally
                     proposed. </t>
               </list>
            </t>
         </section>
      </section>

   </middle>

   <back>

      <references
         title="Normative References">


         <reference
            anchor="RFC5321">

            <front>
               <title>Simple Mail Transfer Protocol</title>
               <author
                  fullname="J. Klensin"
                  initials="J."
                  surname="Klensin">
                  <organization />
               </author>
               <date
                  month="October"
                  year="2008" />
               <abstract>
                  <t>This document is a specification of the basic protocol for
                     Internet electronic mail transport. It consolidates,
                     updates, and clarifies several previous documents, making
                     all or parts of most of them obsolete. It covers the SMTP
                     extension mechanisms and best practices for the
                     contemporary Internet, but does not provide details about
                     particular extensions. Although SMTP was designed as a mail
                     transport and delivery protocol, this specification also
                     contains information that is important to its use as a
                     "mail submission" protocol for "split-UA" (User Agent) mail
                     reading systems and mobile environments. [STANDARDS
                     TRACK]</t>
               </abstract>
            </front>

            <seriesInfo
               name="RFC"
               value="5321" />
            <format
               octets="225929"
               target="ftp://ftp.isi.edu/in-notes/rfc5321.txt"
               type="TXT" />
         </reference>



         <reference
            anchor="RFC5322">

            <front>
               <title>Internet Message Format</title>
               <author
                  fullname="Peter W. 
                  Resnick"
                  initials="P."
                  role="editor"
                  surname="Resnick">
                  <organization>Qualcomm Incorporated</organization>
                  <address>
                     <postal>
                        <street>5775 Morehouse Drive</street>
                        <city>San Diego</city>
                        <region>CA</region>
                        <code>92121-1714</code>
                        <country>US</country></postal>
                     <phone>+1 858 651 4478</phone>
                     <email>presnick@qualcomm.com</email>
                     <uri>http://www.qualcomm.com/~presnick/</uri></address>
               </author>
               <date
                  month="October"
                  year="2008" />
               <abstract>
                  <t>This document specifies the Internet Message Format (IMF),
                     a syntax for text messages that are sent between computer
                     users, within the framework of "electronic mail" messages.
                     This specification is a revision of Request For Comments
                     (RFC) 2822, which itself superseded Request For Comments
                     (RFC) 822, "Standard for the Format of ARPA Internet Text
                     Messages", updating it to reflect current practice and
                     incorporating incremental changes that were specified in
                     other RFCs.</t>
               </abstract>
            </front>

            <seriesInfo
               name="RFC"
               value="5322" />
            <format
               octets="122322"
               target="ftp://ftp.isi.edu/in-notes/rfc5322.txt"
               type="TXT" />
            <format
               octets="213342"
               target="http://xml.resource.org/public/rfc/html/rfc5322.html"
               type="HTML" />
            <format
               octets="174183"
               target="http://xml.resource.org/public/rfc/xml/rfc5322.xml"
               type="XML" />
         </reference>

         <reference
            anchor="RFC5234">

            <front>
               <title>Augmented BNF for Syntax Specifications: ABNF</title>
               <author
                  fullname="D. Crocker"
                  initials="D."
                  surname="Crocker">
                  <organization />
               </author>
               <author
                  fullname="P. Overell"
                  initials="P."
                  surname="Overell">
                  <organization />
               </author>
               <date
                  month="January"
                  year="2008" />
               <abstract>
                  <t>Internet technical specifications often need to define a
                     formal syntax. Over the years, a modified version of
                     Backus-Naur Form (BNF), called Augmented BNF (ABNF), has
                     been popular among many Internet specifications. The
                     current specification documents ABNF. It balances
                     compactness and simplicity with reasonable representational
                     power. The differences between standard BNF and ABNF
                     involve naming rules, repetition, alternatives,
                     order-independence, and value ranges. This specification
                     also supplies additional rule definitions and encoding for
                     a core lexical analyzer of the type common to several
                     Internet specifications. [STANDARDS TRACK]</t>
               </abstract>
            </front>

            <seriesInfo
               name="STD"
               value="68" />
            <seriesInfo
               name="RFC"
               value="5234" />
            <format
               octets="26359"
               target="ftp://ftp.isi.edu/in-notes/rfc5234.txt"
               type="TXT" />
         </reference>

         <reference
            anchor="RFC2045">

            <front>
               <title
                  abbrev="Internet Message Bodies">Multipurpose Internet Mail
                  Extensions (MIME) Part One: Format of Internet Message
                  Bodies</title>
               <author
                  fullname="Ned Freed"
                  initials="N."
                  surname="Freed">
                  <organization>Innosoft International, Inc.</organization>
                  <address>
<postal>
<street>1050 East Garvey Avenue South</street>
<city>West Covina</city>
<region>CA</region>
<code>91790</code>
<country>US</country></postal>
<phone>+1 818 919 3600</phone>
<facsimile>+1 818 919 3614</facsimile>
<email>ned@innosoft.com</email></address>
               </author>
               <author
                  fullname="Nathaniel S. Borenstein"
                  initials="N.S."
                  surname="Borenstein">
                  <organization>First Virtual Holdings</organization>
                  <address>
<postal>
<street>25 Washington Avenue</street>
<city>Morristown</city>
<region>NJ</region>
<code>07960</code>
<country>US</country></postal>
<phone>+1 201 540 8967</phone>
<facsimile>+1 201 993 3032</facsimile>
<email>nsb@nsb.fv.com</email></address>
               </author>
               <date
                  month="November"
                  year="1996" />
               <abstract>
                  <t>STD 11, RFC 822, defines a message representation protocol
                     specifying considerable detail about US-ASCII message
                     headers, and leaves the message content, or message body,
                     as flat US-ASCII text. This set of documents, collectively
                     called the Multipurpose Internet Mail Extensions, or MIME,
                     redefines the format of messages to allow for</t>
                  <t>(1) textual message bodies in character sets other than
                     US-ASCII,</t>
                  <t>(2) an extensible set of different formats for non-textual
                     message bodies,</t>
                  <t>(3) multi-part message bodies, and</t>
                  <t>(4) textual header information in character sets other than
                     US-ASCII.</t>
                  <t>These documents are based on earlier work documented in RFC
                     934, STD 11, and RFC 1049, but extends and revises them.
                     Because RFC 822 said so little about message bodies, these
                     documents are largely orthogonal to (rather than a revision
                     of) RFC 822.</t>
                  <t>This initial document specifies the various headers used to
                     describe the structure of MIME messages. The second
                     document, RFC 2046, defines the general structure of the
                     MIME media typing system and defines an initial set of
                     media types. The third document, RFC 2047, describes
                     extensions to RFC 822 to allow non-US-ASCII text data in
                     Internet mail header fields. The fourth document, RFC 2048,
                     specifies various IANA registration procedures for
                     MIME-related facilities. The fifth and final document, RFC
                     2049, describes MIME conformance criteria as well as
                     providing some illustrative examples of MIME message
                     formats, acknowledgements, and the bibliography.</t>
                  <t>These documents are revisions of RFCs 1521, 1522, and 1590,
                     which themselves were revisions of RFCs 1341 and 1342. An
                     appendix in RFC 2049 describes differences and changes from
                     previous versions.</t>
               </abstract>
            </front>

            <seriesInfo
               name="RFC"
               value="2045" />
            <format
               octets="72932"
               target="ftp://ftp.isi.edu/in-notes/rfc2045.txt"
               type="TXT" />
         </reference>



         <reference
            anchor="RFC2046">

            <front>
               <title
                  abbrev="Media Types">Multipurpose Internet Mail Extensions
                  (MIME) Part Two: Media Types</title>
               <author
                  fullname="Ned Freed"
                  initials="N."
                  surname="Freed">
                  <organization>Innosoft International, Inc.</organization>
                  <address>
<postal>
<street>1050 East Garvey Avenue South</street>
<city>West Covina</city>
<region>CA</region>
<code>91790</code>
<country>US</country></postal>
<phone>+1 818 919 3600</phone>
<facsimile>+1 818 919 3614</facsimile>
<email>ned@innosoft.com</email></address>
               </author>
               <author
                  fullname="Nathaniel S. Borenstein"
                  initials="N."
                  surname="Borenstein">
                  <organization>First Virtual Holdings</organization>
                  <address>
<postal>
<street>25 Washington Avenue</street>
<city>Morristown</city>
<region>NJ</region>
<code>07960</code>
<country>US</country></postal>
<phone>+1 201 540 8967</phone>
<facsimile>+1 201 993 3032</facsimile>
<email>nsb@nsb.fv.com</email></address>
               </author>
               <date
                  month="November"
                  year="1996" />
               <abstract>
                  <t>STD 11, RFC 822 defines a message representation protocol
                     specifying considerable detail about US-ASCII message
                     headers, but which leaves the message content, or message
                     body, as flat US-ASCII text. This set of documents,
                     collectively called the Multipurpose Internet Mail
                     Extensions, or MIME, redefines the format of messages to
                     allow for</t>
                  <t>(1) textual message bodies in character sets other than
                     US-ASCII,</t>
                  <t>(2) an extensible set of different formats for non-textual
                     message bodies,</t>
                  <t>(3) multi-part message bodies, and</t>
                  <t>(4) textual header information in character sets other than
                     US-ASCII.</t>
                  <t>These documents are based on earlier work documented in RFC
                     934, STD 11 and RFC 1049, but extends and revises them.
                     Because RFC 822 said so little about message bodies, these
                     documents are largely orthogonal to (rather than a revision
                     of) RFC 822.</t>
                  <t>The initial document in this set, RFC 2045, specifies the
                     various headers used to describe the structure of MIME
                     messages. This second document defines the general
                     structure of the MIME media typing system and defines an
                     initial set of media types. The third document, RFC 2047,
                     describes extensions to RFC 822 to allow non-US-ASCII text
                     data in Internet mail header fields. The fourth document,
                     RFC 2048, specifies various IANA registration procedures
                     for MIME-related facilities. The fifth and final document,
                     RFC 2049, describes MIME conformance criteria as well as
                     providing some illustrative examples of MIME message
                     formats, acknowledgements, and the bibliography.</t>
                  <t>These documents are revisions of RFCs 1521 and 1522, which
                     themselves were revisions of RFCs 1341 and 1342. An
                     appendix in RFC 2049 describes differences and changes from
                     previous versions.</t>
               </abstract>
            </front>

            <seriesInfo
               name="RFC"
               value="2046" />
            <format
               octets="105854"
               target="ftp://ftp.isi.edu/in-notes/rfc2046.txt"
               type="TXT" />
         </reference>

      </references>

   </back>

</rfc>
