<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>

<rfc ipr="trust200902" category="info" docName='draft-melnikov-email-draft-and-release-01'>
  <front>
    <title abbrev="Draft &amp; Release email messages">
      Implementing Draft &amp; Release and Draft &amp; Review in Internet Mail
    </title>
    <author initials="A." surname="Melnikov" fullname="Alexey Melnikov" role="editor">
      <organization>Isode Ltd</organization>
      <address>
	<postal>
	  <street>14 Castle Mews</street>
	  <city>Hampton</city>
	  <region>Middlesex</region>
	  <code>TW12 2NP</code>
	  <country>UK</country>
	</postal>
	<email>Alexey.Melnikov@isode.com</email>
      </address>
    </author>
      
    <date year="2015" />
    
    <keyword>MMHS</keyword>
    <keyword>email</keyword>

    <abstract>

    <t>
    This document describes how draft messages intended for Draft &amp; Release and Draft &amp; Review environments
    can be represented in Internet Email.
    </t>
	
    </abstract>
    
  </front>
  <middle>

    <section title="Introduction">

      <t>
      In some environments email messages can't be released to
<!--////Is "mail transfer system" a term? Is it a proper expansion of it?-->
      the MTS (Mail Transfer System) and, thus delivered to recipients, unless
      they are authorized by one or more authorizing users (e.g. Releasing Officers or Release Authorities).
      This document describes how such Draft messages can be represented as
      Internet Email <xref target="RFC5322"/> MIME objects <xref target="RFC2045"/>.
      </t>

    </section>
    
    <section title="Conventions Used in This Document">
      
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
	    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
	    this document are to be interpreted as described in
	    <xref target="RFC2119"/>.</t>

      <t>The formal syntax uses the <xref target="RFC5234">Augmented
	    Backus-Naur Form (ABNF)</xref> notation including the core rules
	    defined in Appendix B of <xref target="RFC5234">RFC 5234</xref>.
      Terms not defined in this document are taken from <xref target="RFC5322"/>.
      </t>

      <section title='Terminology'>

        <t>
          Drafter: Any email user that composes a message (Draft Message) needing authorisation before it is released to its intended recipients.
        </t>

        <t>
          Authorizing User (also Releaser or Authorizer): The mailbox of a user or a group of users that must inspect
          and authorise the release of Draft Message before it can be sent. An organization may require more than one
          Authorizing User to authorize release of a Draft Message.
        </t>

      </section>
      
    </section>

    
    <section title="Structure of a draft message">

      <t>
        Message encapsulating a draft message to be released or reviewed (a.k.a. "outer message") is constructed as follows:

        <list style='numbers'>

          <t>
          The media type of the outer message is "multipart/mixed".
          </t>

          <t>
          The outer message contains the Message-Draft header field <xref target="message-draft-header-field"/>.
          The initial message for release/review would contain "For Release", "For Confirmed Release" or "For Review"
          in this header field.
          <cref>Is "For Confirmed Release" needed? Use MDN request instead?</cref>
          </t>

          <t>
            (REQUIRED) The first body part of the outer message contains a human-readable message.
            The purpose of this message is to convey information about the inner draft message
            from the drafter to authorizing user.

            This body part can use any IANA-registered MIME media type, charset, or language.
            But this body part is typically "text/plain".
            Where a description of the error is desired in several languages or
            several media, a "multipart/alternative" construct can be used.
          </t>

          <t>(REQUIRED) The second body part is "message/rfc822" or "message/global".
          It wraps the draft message to be released. The draft message can contain
          MMHS-Authorizing-Users header field <xref target='I-D.melnikov-mmhs-authorizing-users'/>.</t>

          <t>(OPTIONAL) The third and subsequent body parts contain comments from reviewers
          and/or authorizing users. These body parts are typically "text/plain" or "text/html".
          </t>
          
        </list>
      </t>
      
    </section>

    <section title="Structure of a confirmation message">

      <t>
        <list style='numbers'>

          <t>
            The media type of the message confirming that the origina draft message was released, reviewed or rejected can be or any media type.
          </t>

          <t>
            The message includes the Message-Draft header field <xref target="message-draft-header-field"/>
            containing one of "Authorized", "Reviewed" or "Rejected".
          </t>

          <t>The message should contain "In-Reply-To:" header field with the Message-ID of the original draft message.</t>

        </list>

      </t>

    </section>

    <section title="Message-Draft header field" anchor="message-draft-header-field">

      <t>Message-Draft specifies what should be done with a draft message or what was already done with it.</t>

      <t>This message header can appear at most once in the header.</t>
      
      <!--Note: this header field can be present in both the inner and the outer message-->

      <figure><artwork type="ABNF">
  <![CDATA[
    Message-Draft = "Message-Draft:"
                       [FWS] Message-Draft-Type [FWS] CRLF
    
    Message-Draft-Type = "For Release" /
                         "For Confirmed Release" /
                         "For Review" /
                         "Authorized" /
                         "Reviewed" /
                         "Rejected"
]]></artwork></figure>

      
<!--///"For Confirmed Release" might be better implemented with MDN request header field instead?-->
      
<!--Note: 'For Release' is synonymous with 'For Authorisation'-->

    </section>    

    <section title="Registration of new IMAP Keywords" anchor="imap-keywords">

      <t>This document defines several new IMAP keywords that can be used to override values stored
      in the Message-Draft header field. (I.e. if one of these mutually exclusive keywords is found,
      they take precedence over the value specified in the Message-Draft header field.)
      This allow client developers to implement easier draft &amp; release workflow without requiring
      to re-upload the modified message with IMAP APPEND command.</t>

      <t>
        All of the following IMAP keywords are mutually exclusive:

        <!--////Alternatively this can be made a table-->

        <list>
          <t>$DraftForRelease corresponds to the "For Release" value of the Message-Draft header field;</t>

          <t>$DraftForConfirmedRelease corresponds to the "For Confirmed Release" value of the Message-Draft header field;</t>

          <t>$DraftForReview corresponds to the "For Review" value of the Message-Draft header field;</t>

          <t>$DraftAuthorized corresponds to the "Authorized" value of the Message-Draft header field;</t>

          <t>$DraftReviewed corresponds to the "Reviewed" value of the Message-Draft header field;</t>

          <t>$DraftRejected corresponds to the "Rejected" value of the Message-Draft header field.</t>
        </list>
      </t>

    </section>

    <section title="Example">

<figure><artwork>
  <![CDATA[
Date: Thu, 23 Oct 2014 10:07:18 -0400
From: TwHarrierTest <harriertest@example.com>
Message-Draft: For Confirmed Release
Message-Id: <634f2005-0bf1-4e07-a789-e78433a985f7@imap.example.com>
Mmhs-Primary-Precedence: 2
Subject: Cease Fire
To: <alexey.melnikov@example.com>
X-Mailer: Harrier
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=.562b3944-4b07-437f-be7d-1338f523a3a4

This is a multipart message in MIME format.

--.562b3944-4b07-437f-be7d-1338f523a3a4
content-type: text/plain; charset=utf-8

Alexey please release this.
--.562b3944-4b07-437f-be7d-1338f523a3a4
Content-Disposition: attachment
Content-Type: message/rfc822

Content-type: text/plain; charset=utf-8; delsp=yes; format=flowed
From: TwHarrierTest <harriertest@example.com>
message-draft: For Confirmed Release
message-id: <0a2d822c-0b14-4d02-9215-45292676137f@imap.example.com>
MIME-Version: 1.0
mmhs-copy-precedence: 5
mmhs-primary-precedence: 5
Subject: Cease Fire
To:  <commander@example.com>
X-Mailer: Harrier

Text of cease fire msg
--.562b3944-4b07-437f-be7d-1338f523a3a4--
]]></artwork></figure>

    </section>

    <section title="IANA Considerations">

        <t>
        TBD. Need to register IMAP keywords with IANA.
        </t>
      
      <section title="The Message-Draft Header Field registration">
        
        <t>
        IANA is requested to add the Message-Draft header field to the IANA
        "Permanent Message Header Field Names" registry, per the procedure
        found in <xref target="RFC3864"/>.  That entry is to be updated to reference
        this document.  The following is the registration template:

        <list>
          <t>Header field name: Message-Draft</t>
          <t>Applicable protocol: mail (<xref target="RFC5322"/>)</t>
          <t>Status: Standard</t>
          <t>Author/Change controller: IETF</t>
          <t>Specification document(s): [this RFC]</t>
          <t>Related information: none</t>
        </list>

        </t>
      </section>

    </section>

    <section title="Security Considerations" anchor="seccons">

      <t>TBD.</t>

    </section>
    
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?> <!-- Keywords -->
      <?rfc include="reference.RFC.2045"?> <!-- MIME, part 1 -->
      <?rfc include="reference.RFC.3501"?> <!-- IMAP -->
      <?rfc include="reference.RFC.3864"?> <!-- Header Field registration BCP -->
      <?rfc include="reference.RFC.5322"?> <!-- Email Format -->
      <?rfc include="reference.RFC.5234"?> <!-- ABNF -->

      <reference anchor="I-D.melnikov-mmhs-authorizing-users">
        <front>
          <title>Draft and Release using Internet Email</title>
          <author initials="A" surname="Melnikov" fullname="Alexey Melnikov">
            <organization/>
          </author>
          <date month="October" day="22" year="2014"/>
          <abstract>
            <t>
              This document describes a procedure for when an Military Message Handling System (MMHS) message is composed by one user and is only released to the mail transfer system when one or more authorizing users authorize release of the message by adding the MMHS- Authorizing-Users header field. The resulting message can be optionally signed by the sender and/or reviewer, allowing recipients to verify both the original signature (if any) and review signatures.
            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-melnikov-mmhs-authorizing-users-07"/>
        <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-melnikov-mmhs-authorizing-users-07.txt"/>
      </reference>


    </references>

<!--    
    <references title="Informative References">
    </references>
-->

    <section title="Acknowledgements">
	
      <t>Thank you to Steve Kille and Tom Watson for suggestions, comments and corrections on this document.</t>

    </section>

  </back>
</rfc>
