/
537.txt
96 lines (65 loc) · 3.43 KB
/
537.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
* 仕様書
[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]]。
* 本体部分
[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]]。
* 実装
[1] [[Postfix]] は ([[SMTP]] 経由でも [[sendmail]] [[命令]]経由でも)
[CODE(MIME)@en[[[multipart/digest]]]] 内の[[本体部分]]に
[CODE(MIME)@en[[[message/rfc822]]]] なものがあると、
勝手に先頭に[[改行]]を挿入して構造を破壊してしまうことがあります。
* 仕様書から
**RFC 2046 5.1.5. Digest Subtype
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 ------
***License
[[RFCのライセンス]]