[14] [DFN[[CODE(MIME)@en[[[multipart/digest]]]]]] は、
複数の[[電子メール]]メッセージを一纏めにして送信する時に使う
[[MIME型]]です。

* 仕様書

[REFS[
- [2] [CITE@en[RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types]] ([TIME[2015-03-22 13:14:46 +09:00]] 版) <http://tools.ietf.org/html/rfc2046#section-5.1.1>
- [5] '''[CITE@en[RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types]] ([TIME[2015-03-22 13:14:46 +09:00]] 版) <http://tools.ietf.org/html/rfc2046#section-5.1.5>'''
]REFS]

* 意味

[9] [[メッセージ]]を集めて送信することを想定しています [SRC[>>5]]。

* 構文

[7] [CODE(MIME)@en[[[multipart/mixed]]]] と同じです [SRC[>>5]]。

* 引数

[13] [CODE(MIME)@en[[[multipart/*]]]] 全体で共通の
[CODE(MIME)@en[[[boundary]]]] [[引数]]のみあります。必須です。

* 本体部分

[3] [CODE(MIME)@en[[[Content-Type:]]]] が省略された場合の既定値は、
[CODE(MIME)@en[[[message/rfc822]]]] です [SRC[>>2, >>5]]。

;; [4] これは他の [CODE(MIME)@en[[[multipart/*]]]] とは異なります。

;; [8] これは可読性と大まかな [[RFC 934]] との互換性のためです [SRC[>>5]]。

[6] [CODE(MIME)@en[[[message/rfc822]]]] 以外を[[本体部分]]として含めることもできますが、
好ましくありません [SRC[>>5]]。

;; [10] そのような場合は別途 [CODE(MIME)@en[[[multipart/mixed]]]] を使うべきです [SRC[>>5]]。

* 文脈

[11] [[メーリングリスト]]の[[アーカイブ]]サービスが、
指定された[[メール]]群を返送するために使うことがあります。

[15] 最近ではあまり見かけなくなりました。

* 歴史

[FIG(quote)[
[FIGCAPTION[
[12] RFC 2046 5.1.5.  Digest Subtype
]FIGCAPTION]

   This document defines a "digest" subtype of the "multipart" Content-
   Type.  This type is syntactically identical to "multipart/mixed", but
   the semantics are different.  In particular, in a digest, the default
   Content-Type value for a body part is changed from "text/plain" to
   "message/rfc822".  This is done to allow a more readable digest
   format that is largely compatible (except for the quoting convention)
   with RFC 934.

Note: Though it is possible to specify a Content-Type value for a
body part in a digest which is other than "message/rfc822", such as a
"text/plain" part containing a description of the material in the
digest, actually doing so is undesireble. The "multipart/digest"
Content-Type is intended to be used to send collections of messages.
If a "text/plain" part is needed, it should be included as a seperate
part of a "multipart/mixed" message.

A digest in this format might, then, look something like this:

     From: Moderator-Address
     To: Recipient-List
     Date: Mon, 22 Mar 1994 13:34:51 +0000
     Subject: Internet Digest, volume 42
     MIME-Version: 1.0
     Content-Type: multipart/mixed;
                   boundary="---- main boundary ----"

     ------ main boundary ----

       ...Introductory text or table of contents...

     ------ main boundary ----
     Content-Type: multipart/digest;
                   boundary="---- next message ----"

     ------ next message ----

     From: someone-else
     Date: Fri, 26 Mar 1993 11:13:32 +0200
     Subject: my opinion

       ...body goes here ...

     ------ next message ----

     From: someone-else-again
     Date: Fri, 26 Mar 1993 10:07:13 -0500
     Subject: my different opinion

       ... another body goes here ...

     ------ next message ------

     ------ main boundary ------
]FIG]

[1] [[Postfix]] は ([[SMTP]] 経由でも [[sendmail]] [[命令]]経由でも) 
[CODE(MIME)@en[[[multipart/digest]]]] 内の[[本体部分]]に
[CODE(MIME)@en[[[message/rfc822]]]] なものがあると、
勝手に先頭に[[改行]]を挿入して構造を破壊してしまうことがあります。
