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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
|
<pre>Network Working Group D. Robinson
Request for Comments: 1154 R. Ullmann
Prime Computer, Inc.
April 1990
<span class="h1">Encoding Header Field for Internet Messages</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Status of the Memo</span>
This RFC proposes an elective experimental Encoding header field to
permit the mailing of multi-part, multi-structured messages.
The use of Encoding updates <a href="./rfc1049">RFC 1049</a> (Content-Type), and is a
suggested update to RFCs 1113, 1114, and 1115 (Privacy Enhancement)
[<a href="#ref-4" title=""Privacy Enhancement for Internet Electronic Mail: Part I -- Message Encipherment and Authentication Procedures"">4</a>,<a href="#ref-7" title=""Privacy Enhancement for Internet Electronic Mail: Part II -- Certificate-Based Key Management"">7</a>,<a href="#ref-8" title=""Privacy Enhancement for Internet Electronic Mail: Part III -- Algorithms, Modes, and Identifiers"">8</a>].
Distribution of this memo is unlimited.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Introduction</span>
<a href="./rfc822">RFC 822</a> [<a href="#ref-2" title=""Standard for the Format of ARPA Internet Text Messages"">2</a>] defines an electronic mail message to consist of two
parts, the message header and the message body, separated by an
apparently blank line.
The Encoding header field permits the message body itself to be
further broken up into parts, each part also separated from the next
by an apparently blank line.
Thus, conceptually, a message has a header part, followed by one or
more body parts, all separated by blank lines.
Each body part has an encoding type. The default (no Encoding field
in the header) is a message body of one part of type "text".
3. The Encoding Field
The Encoding field consists of one or more subfields, separated by
commas. Each subfield corresponds to a part of the message, in the
order of that part's appearance. A subfield consists of a line
count, a keyword defining the encoding, and optional information
relevant only to the specific encoding. The line count is optional
in the last subfield.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Format of the Encoding Field</span>
The format of the Encoding field is:
<span class="grey">Robinson & Ullmann [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
[<count> <keyword> [<options>], ]* [<count>] <keyword> [<options>]
where:
<count> := a decimal integer
<keyword> := a single alphanumeric token starting with an alpha
<options> := keyword-dependent options
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. <count></span>
The line count is a decimal number specifying the number of text
lines in the part. Parts are separated by a blank line, which is not
included in the count of either the proceeding or following part.
Because a count always begins with a digit and a keywords always
begins with an letter, it is always possible to determine if the
count is present. (The count is first because it is the only
information of interest when skipping over the part.)
The count is not required on the last or only part.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. <keyword></span>
The keyword defines the encoding type. The keyword is a common
single word name for the encoding type. The keywords are not case-
sensitive.
The list of standard keywords is intended to be the same as the list
used for the Content-Type: header described in [<a href="#ref-6" title=""Content-type Header Field for Internet Messages"">6</a>]. This RFC
proposes additions to the list. Implementations can then treat
"Content-Type" as an alias of "Encoding", which will always have only
one body part.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. <options></span>
The optional information is used to specify additional keyword-
specific information needed for interpreting the contents of the
encoded part. It is any sequence of tokens not containing a comma.
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. Encoding Version Numbers</span>
In general, version numbers for encodings, when not actually
available within the contents of the encoded information, will be
handled as options.
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a>. Comments</span>
Comments enclosed in parentheses may, of course, be inserted anywhere
in the Encoding field. Mail reading systems may pass the comments to
<span class="grey">Robinson & Ullmann [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
their clients. Comments must not be used by mail reading systems for
content interpretation; that is the function of options.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Encodings</span>
This section describes some of the defined encodings used.
As with the other keyword-defined parts of the header format
standard, extensions in the form of new keywords are expected and
welcomed. Several basic principles should be followed in adding
encodings:
- The keyword should be the most common single word name for the
encoding, including acronyms if appropriate. The intent is that
different implementors will be likely to choose the same name for
the same encoding.
- Keywords not be too general: "binary" would have been a bad
choice for the "hex" encoding.
- The encoding should be as free from unnecessary idiosyncracies
as possible, except when conforming to an existing standard, in
which case there is nothing that can be done.
- The encoding should, if possible, use only the 7 bit ASCII
printing characters if it is a complete transformation of a source
document (e.g., "hex" or "uuencode"). If it is essentially a text
format, the full range may be used. If there is an external
standard, the character set may already be defined.
Keywords beginning with "X-" are permanently reserved to
implementation-specific use. No standard registered encoding keyword
will ever begin with "X-".
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Text</span>
This indicates that the message is in no particular encoded format,
but is to be presented to the user as is.
The full range of the ASCII character set is used. The message is
expected to consist of lines of reasonable length (less than 1000
characters).
On some transport services, only the 7 bit subset of ASCII can be
used. Where full 8 bit transparency is available, the text is
assumed to be ISO 8859-1 [<a href="#ref-3" title=""Information processing - 8-bit single-byte coded graphic character sets - Part 1: Latin alphabet No. 1"">3</a>] (ASCII-8).
<span class="grey">Robinson & Ullmann [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Message</span>
This encoding indicates that the body part is itself in the format of
an Internet message, with its own header part and body part(s). A
"message" body part's message header may be a full internet message
header or it may consist only of an Encoding field.
Using the message encoding on returned mail makes it practical for a
mail reading system to implement a reliable resending function, if
the mailer generates it when returning contents. It is also useful
in a "copy append" MUA operation.
Message encoding is also used when mapping to X.400 to handle
recursively included X.400 P2 messages.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Hex</span>
The encoding indicates that the body part contains binary data,
encoded as 2 hexadecimal digits per byte, highest significant nibble
first.
Lines consist of an even number of hexadecimal digits. Blank lines
are not permitted. The decode process must accept lines with between
2 and 1000 characters, inclusive.
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. EVFU</span>
EVFU (Electronic Vertical Format Unit) specifies that each line
begins with a one-character "channel selector". The original purpose
was to select a channel on a paper tape loop controlling the printer.
This encoding is sometimes called "FORTRAN" format. It is the default
output format of FORTRAN programs on a number of computer systems.
The legal characters are '0' to '9', '+', '-', and space. These
correspond to the 12 rows (and absence of a punch) on a printer
control tape (used when the control unit was electromechanical).
The channels that have generally agreed definitions are:
1 advances to the first print line on the next page
0 skip a line, i.e., double-space
+ over-print the preceeding line
- skip 2 lines, i.e., triple-space
(space) print on the next line, single-space
<span class="grey">Robinson & Ullmann [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. EDI</span>
The EDI (Electronic Document Interchange) keyword indicates that the
message or part is a business document, formatted according to ANSI
X12 or related standards.
The first word after the EDI keyword indicates the particular
interchange standard.
A message containing a note and 2 X12 purchase orders might have an
encoding of:
Encoding: 17 TEXT, 146 EDI X12, 69 EDI X12
<span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. X.400</span>
The Encoding header field provides a mechanism for mapping multi-part
messages between CCITT X.400 [<a href="#ref-1" title=""Data Communication Networks: Message Handling Systems"">1</a>] and <a href="./rfc822">RFC 822</a>.
The X.400 keyword specifies a section that is converted from an X.400
body part type not known to the gateway, or not corresponding to a
useful internet encoding.
If the message transits another gate, or if the receiving user has
the appropriate software, it can be decoded and used.
The X.400 keyword is followed by a second token indicating the method
used. The simplest form is "X.400 HEX", with the complete X.409
encoding of the body part in hexadecimal. More compact is "X.400
3/4", using the 3-byte to 4-character encoding as specified in <a href="./rfc1113">RFC</a>
<a href="./rfc1113">1113</a>, <a href="#section-4.3.2.4">section 4.3.2.4</a>.
<span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. uuencode</span>
The uuencode keyword specifies a section consisting of the output of
the uuencode program supplied as part of uucp.
<span class="h3"><a class="selflink" id="section-4.8" href="#section-4.8">4.8</a>. encrypted</span>
The encrypted keyword indicates that the section is encrypted with
the methods in <a href="./rfc1115">RFC 1115</a> [<a href="#ref-8" title=""Privacy Enhancement for Internet Electronic Mail: Part III -- Algorithms, Modes, and Identifiers"">8</a>]. This replaces the possible use of <a href="./rfc934">RFC</a>
<a href="./rfc934">934</a> [<a href="#ref-5" title=""Proposed Standard for Message Encapsulation"">5</a>] encapsulation.
References
[<a id="ref-1">1</a>] International Telegraph and Telephone Consultative Committee,
"Data Communication Networks: Message Handling Systems", In CCITT
Recommendations X.400 to X.430, VIIIth Plenary Assembly, Malaga-
<span class="grey">Robinson & Ullmann [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
Torremolinos, 1984, Fascicle VIII.7 ("Red Book").
[<a id="ref-2">2</a>] Crocker, D., "Standard for the Format of ARPA Internet Text
Messages", <a href="./rfc822">RFC 822</a>, University of Delaware, August 1982.
[<a id="ref-3">3</a>] International Organization for Standardization, "Information
processing - 8-bit single-byte coded graphic character sets -
Part 1: Latin alphabet No. 1", ISO 8859-1, ISO, 1987.
[<a id="ref-4">4</a>] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part
I -- Message Encipherment and Authentication Procedures", <a href="./rfc1113">RFC</a>
<a href="./rfc1113">1113</a>, IAB Privacy Task Force, August 1989.
[<a id="ref-5">5</a>] Rose, M., and E. Stefferud, "Proposed Standard for Message
Encapsulation", <a href="./rfc943">RFC 943</a>, University of Delaware and NMA, January
1985.
[<a id="ref-6">6</a>] Sirbu, M., "Content-type Header Field for Internet Messages", <a href="./rfc1049">RFC</a>
<a href="./rfc1049">1049</a>, CMU, March 1988.
[<a id="ref-7">7</a>] Kent, S., and J. Linn, "Privacy Enhancement for Internet
Electronic Mail: Part II -- Certificate-Based Key Management",
<a href="./rfc1114">RFC 1114</a>, IAB Privacy Task Force, August 1989.
[<a id="ref-8">8</a>] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part
III -- Algorithms, Modes, and Identifiers", <a href="./rfc1115">RFC 1115</a>, IAB Privacy
Task Force, August 1989.
Security Considerations
Security issues are not addressed in this memo.
Authors' Addresses
David Robinson 10-30
Prime Computer, Inc.
500 Old Connecticut Path
Framingham, MA 01701
Phone: +1 508 879 2960 x1774
Email: DRB@Relay.Prime.COM
Robert Ullmann 10-30
Prime Computer, Inc.
500 Old Connecticut Path
Framingham, MA 01701
<span class="grey">Robinson & Ullmann [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1154">RFC 1154</a> Encoding Header Field for Internet Messages April 1990</span>
Phone: +1 508 879 2960 x1736
Email: Ariel@Relay.Prime.COM
Robinson & Ullmann [Page 7]
</pre>
|