RFC 2425

A MIME Content-Type for Directory Information

πŸ“… published September 1998, from ietf

A MIME Content-Type for Directory Information πŸ’–

okay bestie, meet RFC 2425 πŸŽ€ It's a Standards Track doc from the Network Working Group, dated September 1998. The authors are T. Howes and M. Smith from Netscape Communications Corp., plus F. Dawson from Lotus Development Corporation. Nothing in the title block says it obsoletes or updates another RFC, so it's standing on its own ✨


Status of this Memo πŸ“œ

This document is an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited πŸ’…


Copyright (C) The Internet Society (1998). All Rights Reserved.


1. Abstract 🌈

This doc defines a MIME Content-Type for holding directory information, and it's totally independent of any particular directory service or protocol πŸ™Œ The text/directory Content-Type is built for storing all kinds of directory info, like a name, an email address, or a logo. It can also be the root body part in a multipart/related Content-Type when things get more complicated, especially when there's non-textual info that already has a natural MIME representation, like a photograph or a sound 🎢

The text/directory Content-Type gives you a general framework and format for holding directory info in a simple "type:value" form. Here, "type" means the property or attribute the value is attached to. The spec also defines mechanisms for alternate languages, encodings, and other meta-information 🧚 It sets up the procedure for defining and registering profiles, which are particular formats for carrying application-specific info inside a text/directory Content-Type, and it lays out the rules those formats have to follow. Other docs are expected to define these formats for different applications, like white pages πŸ“‡

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 [RFC-2119] 🫢


2. Table of Contents πŸ“š

Status of the Memo................................................ 1
Copyright Notice.................................................. 1
1.  Abstract...................................................... 1
2.  Table of Contents............................................. 2
3.  Need for a MIME Directory Type................................ 3
4.  Overview...................................................... 4
5.  The text/directory Content-Type............................... 4
5.1.  MIME media type name........................................ 4
5.2.  MIME subtype name........................................... 5
5.3.  Required parameters......................................... 5
5.4.  Optional parameters......................................... 5
5.5.  Encoding considerations..................................... 5
5.6.  Security considerations..................................... 6
5.7.  Interoperability considerations............................. 6
5.8.  Published specification..................................... 6
5.8.1.  Line delimiting and folding............................... 6
5.8.2.  ABNF content-type definition.............................. 7
5.8.3.  Pre-defined Parameters.................................... 9
5.8.4.  Pre-defined Value Types...................................11
5.9.  Applications which use this media type......................14
5.10.  Additional information.....................................14
5.11.  Person & email address to contact for further information..14
5.12.  Intended usage.............................................14
5.13.  Author/Change controller...................................15
6.  Predefined Types..............................................15
6.1.  SOURCE Type Definition......................................15
6.2.  NAME Type Definition........................................16
6.3.  PROFILE Type Definition.....................................16
6.4.  BEGIN Type Definition.......................................17
6.5.  END Type Definition.........................................17
7.  Use of the multipart/related Content-Type.....................18
8. Examples.......................................................18
8.1.  Example 1...................................................19
8.2.  Example 2...................................................19
8.3.  Example 3...................................................20
8.4.  Example 4...................................................21
9.  Registration of new profiles..................................22
9.1.  Define the profile..........................................22
9.2.  Post the profile definition.................................23
9.3.  Allow a comment period......................................23
9.4.  Submit the profile for approval.............................23
10.  Profile Change Control.......................................23
11.  Registration of new types....................................24
11.1.  Define the type............................................24
11.2.  Post the type definition...................................25
11.3.  Allow a comment period.....................................25
11.4.  Submit the type for approval...............................25
12.  Type Change Control..........................................25
13.  Registration of new parameters...............................26
13.1.  Define the parameter.......................................26
13.2.  Post the parameter definition..............................27
13.3.  Allow a comment period.....................................27
13.4.  Submit the parameter for approval..........................27
14.  Parameter Change Control.....................................28
15.  Registration of new value types..............................28
15.1.  Define the value type......................................28
15.2.  Post the value type definition.............................29
15.3.  Allow a comment period.....................................29
15.4.  Submit the value type for approval.........................29
16.  Security Considerations......................................30
17. Acknowledgements..............................................30
18. References....................................................30
19.  Authors' Addresses...........................................32
20. Full Copyright Statement......................................33

3. Need for a MIME Directory Type πŸ’Œ

For this doc, a directory is a special-purpose database that holds typed info. Directories usually let you read and search the info they hold, and they can also support creating and changing it. Directory info gets accessed way more often than it gets updated πŸ‘€ Directories can be local or global in scope, they can be distributed or centralized, and their info can be replicated with weak or strong consistency requirements.

There are a bunch of situations where Internet mail users might want to swap directory info: the email version of a "business card" exchange, getting directory info to someone who only has email access to the Internet, giving machine-parseable address info when you buy goods or services online, etc. πŸ›οΈ MIME [RFC-2045, RFC-2046] is being used more and more by other protocols, most notably HTTP, so those protocols can also be a great place to carry directory info in MIME format. That format could represent URC (uniform resource characteristics) info about resources on the World Wide Web, or give you a rudimentary directory service over HTTP πŸ•ΈοΈ


4. Overview πŸ”­

The way this spec represents directory info in a MIME Content-Type has two parts 🧩 First, the text/directory Content-Type is for holding directory info inside a single body part, like a name, a title, or an email address. In its simplest form it uses a "type:value" approach, which should be easily parseable by existing MIME implementations and understandable by users. More complicated situations can be represented too. The doc sets out the general form the info in the Content-Type should have, plus the procedure for defining specific types and values (properties) for particular applications. The framework is general enough to handle info from any number of directory services, including LDAP [RFC-1777, RFC-1778], WHOIS++ [RFC-1835], and X.500 [X500] πŸ’–

Directory entries can hold way more than just text. Some of that stuff (like an image or a sound) overlaps with predefined MIME Content-Types. In those cases it can make sense to include the info in its well-known MIME format. That's handled with a multipart/related Content-Type as defined in [RFC-2112] πŸŽ€ The root component of this type is a text/directory body part with any in-line info, and for info in other Content-Types, it uses the Content-IDs (in URI form) of those parts.

In some applications, it can be useful to include a pointer (e.g., a URI) to some directory info instead of the info itself. This document defines a general mechanism for doing exactly that πŸ¦‹


5. The text/directory Content-Type 🌸

The text/directory Content-Type holds basic directory info and URIs that reference other info, including other MIME body parts with supplementary or non-textual directory info, like an image or a sound. It's defined below using the MIME media type registration template from [RFC-2048] πŸ“

To: ietf-types@uninett.no
Subject: Registration of MIME media type text/directory

5.1. MIME media type name 🏷️

MIME media type name: text

5.2. MIME subtype name πŸ“

MIME subtype name: directory

5.3. Required parameters πŸ”‘

Required parameters: charset

The "charset" parameter is as defined in [RFC-2046] for other body parts. It's used to identify the default character set used within the body part πŸ’œ

5.4. Optional parameters πŸ’–

Optional parameters: profile

okay so the "profile" parameter πŸŽ€ tells you what kind of entity (or entities) the directory info is about, plus the kind of stuff you'd probably find with them. it's only a guide for apps reading the body part ✨ bestie, it SHOULD NOT be used to exclude or require particular pieces of information unless a profile definition specifically calls for that behavior. unless a profile definition specifically forbids it, a text/directory content type can hold arbitrary attribute/value pairs 🌸

the value of the "profile" parameter is defined like this. profile names are case insensitive πŸ’… so "vCard" is the same as "VCARD" and "vcard" and "vcArD" (iykyk πŸ™ˆ)

      profile = x-name / iana-token

      x-name = "x-" 1*(ALPHA / DIGIT / "-")
          ; Names beginning with "x-" or "X-" are
          ; reserved for experimental use not intended for released
          ; products, or for use in bilateral agreements.

      iana-token = <a publicly-defined extension token, registered
                     with IANA, as specified in Section 9 of this
                     document>

5.5. Encoding considerations πŸ¦‹

the default encoding is 8bit. otherwise, it's whatever the Content-Transfer-Encoding header field says ✨

5.6. Security considerations πŸ’€

okay this section is serious, so listen up πŸ”₯ directory info can be public, or it can be locked down from unauthorized access by the directory service it lives in. but once the info leaves its home service, there is literally no guarantee that every other service handling it will be just as careful 😭 furthermore, this specification does not define any access control mechanism that can protect the information, or any way to convey access control information. ngl that's a whole lot of trust being placed elsewhere. the one bright spot: the integrity and privacy of a text/directory body part CAN be protected by wrapping it in an appropriate MIME-based security mechanism πŸ›‘οΈπŸ’œ

5.7. Interoperability considerations 🧚

so to make sense of directory info, applications have to share a common understanding of the types of info inside the Content-Type (the directory schema) 🌈 this schema info isn't defined in this document. it lives in companion documents (like [MIME-VCARD]) that follow the requirements in this document, or in bilateral agreements between the communicating parties 🫢

5.8. Published specification πŸ“

the text/directory Content-Type holds directory info, typically about a single directory entity or a group of entities. the content is one or more lines in the format below ✨

5.8.1. Line delimiting and folding

okay the lines inside a MIME text/directory Content Type body are separated by the [RFC-822] line break, which is a CRLF sequence (ASCII decimal 13, followed by ASCII decimal 10) πŸŽ€ long logical lines can be split across multiple physical lines using this folding trick. a logical line MAY be continued on the next physical line anywhere between two characters, by inserting a CRLF immediately followed by a single white space character (space, ASCII decimal 32, or horizontal tab, ASCII decimal 9) πŸ’… the folded line must have at least one character on it. any sequence of CRLF followed immediately by a single white space character is ignored (removed) when the content type is processed 🌸

here's an example. this line:

DESCRIPTION:This is a long description that exists on a long line.

can be represented as:

DESCRIPTION:This is a long description
  that exists on a long line.

it could also be represented as:

DESCRIPTION:This is a long descrip
 tion that exists o
 n a long line.

going from this folded, multi-line version back to the single line is called unfolding πŸ¦‹ unfolding works by treating a CRLF immediately followed by a white space character (HTAB, ASCII decimal 9, or SPACE, ASCII decimal 32) as if it were no characters at all. the CRLF and that single white space character just get removed ✨

5.8.2. ABNF content-type definition

this ABNF uses the notation of RFC 2234, which also defines CRLF, WSP, DQUOTE, VCHAR, ALPHA, and DIGIT 🧚 after any folded lines have been unfolded as described above, the syntax for a line of this content type looks like this πŸ’–

contentline  = [group "."] name *(";" param) ":" value CRLF
   ; When parsing a content line, folded lines MUST first
   ; be unfolded according to the unfolding procedure
   ; described above.
   ; When generating a content line, lines longer than 75
   ; characters SHOULD be folded according to the folding
   ; procedure described above.

group        = 1*(ALPHA / DIGIT / "-")

name         = x-name / iana-token

iana-token   = 1*(ALPHA / DIGIT / "-")
   ; identifier registered with IANA

x-name       = "x-" 1*(ALPHA / DIGIT / "-")
   ; Names that begin with "x-" or "X-" are
   ; reserved for experimental use, not intended for released
   ; products, or for use in bilateral agreements.

param        = param-name "=" param-value *("," param-value)

param-name   = x-name / iana-token

param-value  = ptext / quoted-string
ptext  = *SAFE-CHAR

value = *VALUE-CHAR
   / valuespec      ; valuespec defined in section 5.8.4

quoted-string = DQUOTE *QSAFE-CHAR DQUOTE

NON-ASCII    = %x80-FF
   ; use restricted by charset parameter
   ; on outer MIME object (UTF-8 preferred)

QSAFE-CHAR   = WSP / %x21 / %x23-7E / NON-ASCII
   ; Any character except CTLs, DQUOTE

SAFE-CHAR    = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E / NON-ASCII
   ; Any character except CTLs, DQUOTE, ";", ":", ","

VALUE-CHAR   = WSP / VCHAR / NON-ASCII
   ; any textual character

a line that starts with a white space character is a continuation of the previous line, like we covered above 🌷 the white space character and the CRLF right before it should be discarded when you rebuild the original line. the vibe check: this line-folding convention is different from RFC 822 πŸ™ˆ here, a <CRLF><WSP> sequence anywhere in the content means "this line keeps going" and should be removed πŸ’…

various type names and the format of their values are defined as specified in Section 11. specifications MAY impose an ordering on the type constructs within a body part, though none is required by default 🌈 the various x-name constructs are for bilaterally-agreed type names, parameter names, and parameter values, or for experimental settings πŸ§ͺ

type names and parameter names are case insensitive (so "fn" is the same as "FN" and "Fn") πŸ’– parameter values MAY be case sensitive or case insensitive, depending on how they're defined πŸŽ€

the group construct is used to group related attributes together ✨ the group name is a syntactic convention that says all type names with the same group name SHOULD be grouped together when an application displays them. it has no other significance πŸ¦‹ implementations that don't understand or support grouping MAY simply strip off any text before a "." to the left of the type name, and then present the types and values as normal πŸ’…

each attribute defined in the text/directory body MAY have multiple values, if the definition of the profile it's used in allows it 🌸 the general rule for encoding multi-valued items is to simply create a new content line for each value (including the type name). BUT it should be noted that some value types support putting multiple values in a single content line by separating them with a comma ",". this approach was taken for several of the content types defined below (date, time, integer, float) for space-saving reasons 🫢✨

5.8.3. Pre-defined Parameters ✨

Okay bestie, these are the pre-defined parameters and value types that are meant for general use πŸ’… Here's the grammar:

predefined-param = encodingparm
                 / valuetypeparm
                 / languageparm
                 / contextparm

encodingparm = "encoding" "=" encodingtype

encodingtype = "b"       ; from RFC 2047
             / iana-token  ; registered as described in
                           ; section 15 of this document

valuetypeparm = "value" "=" valuetype

valuetype = "uri"        ; genericurl from secion 5 of RFC 1738
          / "text"
          / "date"
          / "time"
          / "date-time" ; date time
          / "integer"
          / "boolean"
          / "float"
          / x-name
          / iana-token  ; registered as described in
                        ; section 15 of this document

languageparm = "language" "=" Language-Tag
    ; Language-Tag is defined in section 2 of RFC 1766

contextparm = "context" "=" context

context = x-name
        / iana-token

The language type parameter is how you flag data that comes in more than one language 🌈 There's no such thing as a "default" language here, unless a Content-Language MIME header parameter is present and says otherwise. The value is a language tag as defined in Section 2 of [RFC-1766].

The context type parameter tells you what context (like a protocol) you need to read the value properly ✨ For example, it shows up in the source type, which we'll get to below.

Now the encoding type parameter is for giving a value its own alternate encoding πŸŽ€ If the value has a CRLF in it, it must be encoded, because CRLF is what separates lines in the content-type itself. Right now, only the b encoding is supported.

The b encoding is also super handy for binary values mixed in with other text in the body part, like a certificate 🫢 Using a per-value b encoding keeps everything else readable. The encoded base 64 value can get split across several physical lines in the content type too, using the line folding technique we covered above.

Important bestie: the Content-Transfer-Encoding header field is for encoding the body part as a whole, while the encoding type parameter is for one specific value (like a certificate). They're separate layers! For example, the Content-Transfer-Encoding header might say 8bit, while one certificate value says encoding=b through its type parameter.

These two are independent of each other πŸ¦‹ When you're encoding a text/directory body part to send it, you do the individual type encodings first, and then encode the whole body part with the Content-Transfer-Encoding. When you're decoding, it's the other way around: undo the Content-Transfer-Encoding first, then decode any individual types that have an encoding type parameter.

The value parameter is optional, and it tells you the value type (data type) and format of the value πŸ’œ Using these predefined formats is encouraged even if you don't explicitly use the value parameter. Having a standard set of value types and formats means existing parsing and processing code can be reused, which is iconic.

Putting the value type right on each property is a little hint that keeps parsing simple and makes the format work for more general applications 🧚 A search engine, for example, wouldn't need to know the exact value types of every item it's searching. Since the value type is explicit, the search engine could look for dates in any item type and still return results it can interpret. Slay πŸ’–

5.8.4. Pre-defined Value Types ✨

Here's where we get the actual formats for the predefined value types we just talked about πŸ“

valuespec =  text-list
           / genericurl       ; from section 5 of RFC 1738
           / date-list
           / time-list
           / date-time-list
           / boolean
           / integer-list
           / float-list
           / iana-valuespec

text-list = *TEXT-LIST-CHAR *("," *TEXT-LIST-CHAR)

TEXT-LIST-CHAR = "\\" / "\," / "\n"
               / <any VALUE-CHAR except , or \ or newline>
    ; Backslashes, newlines, and commas must be encoded.
    ; \n or \N can be used to encode a newline.

date-list = date *("," date)

time-list = time *("," time)

date-time-list = date "T" time *("," date "T" time)

boolean = "TRUE" / "FALSE"

integer-list = integer *("," integer)

integer = [sign] 1*DIGIT

float-list = float *("," float)

float = [sign] 1*DIGIT ["." 1*DIGIT]

sign = "+" / "-"

date = date-fullyear ["-"] date-month ["-"] date-mday

date-fullyear = 4 DIGIT
date-month = 2 DIGIT     ;01-12

date-mday = 2 DIGIT      ;01-28, 01-29, 01-30, 01-31
                         ;based on month/year

time = time-hour [":"] time-minute [":"] time-second [time-secfrac]
        [time-zone]

time-hour = 2 DIGIT      ;00-23

time-minute = 2 DIGIT    ;00-59

time-second = 2 DIGIT    ;00-60 (leap second)

time-secfrac = "," 1*DIGIT

time-zone = "Z" / time-numzone

time-numzome = sign time-hour [":"] time-minute

iana-valuespec = <a publicly-defined valuetype format, registered
                  with IANA, as defined in section 15 of this
                  document>

Some specific notes on each value type, because the details matter πŸ”₯

"text": This is for values with human-readable text πŸ“– The character set and language the text is in get controlled by the charset content-header, plus the language type parameter and content-header. Here are some examples:

this is a text value
this is one value,this is another
this is a single value\, with a comma encoded

A formatted text line break in a text value type MUST be represented as the character sequence backslash (ASCII decimal 92) followed by a Latin small letter n (ASCII decimal 110) or a Latin capital letter N (ASCII decimal 78), that is "\n" or "\N".

Say you have a multiple line DESCRIPTION value like this:

Mythical Manager
Hyjinx Software Division
BabsCo, Inc.

It could be written like this πŸŽ€

DESCRIPTION:Mythical Manager\nHyjinx Software Division\n
 BabsCo\, Inc.\n

This shows off the \n literal formatted line break technique, the CRLF-followed-by-space line folding technique, and the backslash escape technique all at once 🌸

"uri": Use this value type for values that are referenced by a URI (including a Content-ID URI) instead of being encoded in-line πŸ¦‹ This is handy if the value is too big or just not something you want to include directly. The format for the URI is as defined in RFC 1738.

http://www.foobar.com/my/picture.jpg
ldap://ldap.foobar.com/cn=babs%20jensen

"date", "time", and "date-time": Each of these value types is based on a subset of the definitions in the ISO 8601 standard πŸ“… Profiles MAY place further restrictions on "date" and "time" values. Multiple "date" and "time" values can be specified using the comma-separated notation, unless a profile restricts it.

Examples for "date":

1985-04-12
1996-08-05,1996-11-11
19850412

Examples for "time":

10:22:00
102200
10:22:00.33
10:22:00.33Z
10:22:33,11:22:00
10:22:00-08:00

Examples for "date-time":

1996-10-22T14:00:00Z
1996-08-11T12:34:56Z
19960811T123456Z
1996-10-22T14:00:00Z,1996-08-11T12:34:56Z

"boolean": This one's for boolean values, and they're case insensitive πŸ™ˆ

TRUE
false
True

"integer": This is for signed integers in decimal format πŸ”’ If you don't specify a sign, the value is assumed to be positive "+". Multiple "integer" values can be specified with the comma-separated notation, unless a profile restricts it.

1234567890
-1234556790
+1234556790,432109876

"float": This is for real numbers 🌈 Same deal as integers: if there's no sign, it's assumed positive "+", and you can comma-separate multiple "float" values unless a profile says otherwise.

20.30
1000000.0000001
1.333,3.14

5.9. Applications which use this media type

Applications which use this media type: Various πŸ’–

5.10. Additional information

Additional information: None ✨

5.11. Person & email address to contact for further information

Here's who to contact for more info πŸ’Œ

Tim Howes
Netscape Communications Corp.
501 East Middlefield Rd.
Mountain View, CA 94041
USA
howes@netscape.com
+1 415 937 3419

5.12. Intended usage

Intended usage: COMMON πŸ“

5.13. Author/Change controller

The people in charge of this one, bestie πŸ‘‘

Tim Howes
Netscape Communications Corp.
501 East Middlefield Rd.
Mountain View, CA 94041
USA
howes@netscape.com
+1 415 937 3419

Mark Smith
Netscape Communications Corp.
501 East Middlefield Rd.
Mountain View, CA 94041
USA
mcs@netscape.com
+1 415 937 3477

Frank Dawson
Lotus Development Corporation
6544 Battleford Drive
Raleigh, NC 27613-3502
USA
frank_dawson@lotus.com
+1-919-676-9515

6. Predefined Types πŸ’œ

These types are generally useful no matter which profile is being carried 🧚 They're defined below using the text/directory MIME type registration template from Section 11.1 of this document. These types MAY be included in any profile, unless the profile definition explicitly forbids it.

6.1. SOURCE Type Definition πŸ¦‹

Here's the registration template for SOURCE, and it's giving very official energy πŸ’…

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type SOURCE

Type name: SOURCE

Type purpose: To identify the source of directory information
contained in the content type.

Type encoding: 8bit

Type valuetype: uri
Type special notes: The SOURCE type is used to provide the means by
which applications knowledgable in the given directory service
protocol can obtain additional or more up-to-date information from
the directory service. It contains a URI as defined in [RFC-1738]
and/or other information referencing the directory entity or entities
to which the information pertains. When directory information is
available from more than one source, the sending entity can pick what
it considers to be the best source, or multiple SOURCE types can be
included. The interpretation of the value for a SOURCE type can
depend on the setting of the CONTEXT type parameter. The value of the
CONTEXT type parameter MUST be compatible with the value of the uri
prefix.

Type example:
        SOURCE;CONTEXT=LDAP:ldap://ldap.host/cn=Babs%20Jensen,
         %20o=Babsco,%20c=US

6.2. NAME Type Definition ✨

Okay so NAME is the one that gives the directory entity its display name πŸ’–. Here's the registration form, exactly as it's written:

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type NAME

Type name: NAME

Type purpose: To identify the displayable name of the directory
entity to which information in the content type pertains.

Type encoding: 8bit

Type valuetype: text

Type special notes: The NAME type is used to convey the display name
of the entity to which the directory information pertains.

Type example:
        NAME:Babs Jensen's Contact Information

So basically NAME tells you what to call the thing the directory info is about πŸŽ€. It's 8bit, it's text, and it's the pretty label, not the data itself. Iconic ✨

6.3. PROFILE Type Definition πŸ¦‹

PROFILE says what kind of entity the info belongs to. Here's the form:

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type PROFILE

Type name: PROFILE

Type purpose: To identify the type of directory entity to which
information in the content type pertains.

Type encoding: 8bit
Type valuetype: A profile name, registered as described in Section 9
of this document or bilaterally agreed upon as described in Section
5.

Type special notes: The PROFILE type is used to convey the type of
the entity to which the directory information in the rest of the body
part pertains. It should be the same as the "profile" header
parameter, if present.

Type example:
        PROFILE:vCard

Lowkey the vibe here is: the value is a profile name, either one registered under Section 9 or one you and your friends agreed on privately (Section 5). And if there's a "profile" header parameter, PROFILE should match it 🌸

6.4. BEGIN Type Definition 🧚

BEGIN opens a block. Here's the form:

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type BEGIN

Type name: BEGIN

Type purpose: To denote the beginning of a syntactic entity within a
text/directory content-type.

Type encoding: 8bit

Type valuetype: text, containing a profile name, registered as
described in Section 9 of this document or bilaterally-agreed upon as
described in Section 5.

Type special notes: The BEGIN type is used in conjunction with the
END type to delimit a profile containing a related set of properties
within an text/directory content-type. This construct can be used
instead of or in addition to wrapping separate sets of information
inside additional MIME headers. It is provided for applications that
wish to define content that can contain multiple entities within the
same text/directory content-type or to define content that can be
identifiable outside of a MIME environment.

Type example:
        BEGIN:VCARD

So BEGIN is the opener that pairs with END, wrapping up a bunch of related properties into one profile block πŸ’œ. You can use it instead of extra MIME headers, or alongside them. It's also handy when you want the content to stand on its own outside of MIME entirely 🫢

6.5. END Type Definition 🌈

And END is the closer, the other half of the BEGIN duo. Here's the form:

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type END

Type name: END
Type purpose: To denote the end of a syntactic entity within a
text/directory content-type.

Type encoding: 8bit

Type valuetype: text, containing a profile name, registered as
described in Section 9 of this document or bilaterally-agreed upon as
described in Section 5.

Type special notes: The END type is used in conjunction with the
BEGIN type to delimit a profile containing a related set of
properties within an text/directory content-type.  This construct can
be used instead of or in addition to wrapping separate sets of
information inside additional MIME headers. It is provided for
applications that wish to define content that can contain multiple
entities within the same text/directory content-type or to define
content that can be identifiable outside of a MIME environment.

Type example:
        END: VCARD

Same energy as BEGIN, just closing the block instead of opening it πŸ’… Pair them up and you've got a clean, self-contained profile πŸ“


Okay this one's giving "mix text and non-text, no cap." The multipart/related Content-Type lets you hold directory info that's a mix of text and non-text stuff, or stuff that already has a natural MIME representation πŸ¦‹

The root body part inside the multipart/related body part is set up as defined in [RFC-2112], using a "start" parameter. If there's no "start" parameter, the root is just the first body part ✨ The root body part must have a Content-Type of "text/directory". It holds the inline info and points to the later body parts (the ones with extra text or non-text directory info) through their Content-ID URIs, as explained in Section 5 🌸

The body parts being referred to don't have to be in any particular order, except for the root rule above πŸŽ€

8. Examples 🧁

The following examples are for illustrative purposes only and are not part of the definition. Just vibes, not the spec πŸ’…

8.1. Example 1 🌷

This first one shows the simplest use of the text/directory Content-Type. There's no "profile" parameter, so an application might not know what kind of directory entity the info is about πŸ™ˆ It also uses both the hypothetical official types and a bilaterally agreed upon type.

From: Whomever@wherever.com
To: Someone@somewhere.com
Subject: whatever
MIME-Version: 1.0
Message-ID: <id1@host.net>
Content-Type: text/directory
Content-ID: <id2@host.com>

cn:Babs Jensen
cn:Barbara J Jensen
sn:Jensen
email:babs@umich.edu
phone:+1 313 747-4454
x-id:1234567890

8.2. Example 2 πŸ¦‹

Next up, this one uses the Quoted-Printable transfer encoding from [RFC 2045] to get non-ASCII characters into the info ✨ It also shows the optional "name" and "source" types, plus an "encoding" type parameter that encodes a certificate value in "b". The example uses a vCard profile [MIME- VCARD] πŸ’œ

Content-Type: text/directory;
        charset="iso-8859-1";
        profile="vCard"
Content-ID: <id3@host.com>
Content-Transfer-Encoding: Quoted-Printable

begin:VCARD
source:ldap://cn=bjorn%20Jensen, o=university%20of%20Michigan, c=US
name:Bjorn Jensen
fn:Bj=F8rn Jensen
n:Jensen;Bj=F8rn
email;type=internet:bjorn@umich.edu
tel;type=work,voice,msg:+1 313 747-4454
key;type=x509;encoding=B:dGhpcyBjb3VsZCBiZSAKbXkgY2VydGlmaWNhdGUK
end:VCARD

8.3. Example 3 🌈

This one is the big showoff πŸ”₯ It covers multi-valued type parameters, the "language" type parameter, the "value" type parameter, folding of long lines, the \n encoding for formatted lines, attribute grouping, and the inline "b" encoding. Again, it uses a vCard profile [MIME-VCARD] πŸ‘‘

Content-Type: text/directory; profile="vcard"; charset=iso-8859-1
Content-ID: <id3@host.com>
Content-Transfer-Encoding: Quoted-Printable

begin:vcard
source:ldap://cn=Meister%20Berger,o=Universitaet%20Goerlitz,c=DE
name:Meister Berger
fn:Meister Berger
n:Berger;Meister
bday;value=date:1963-09-21
o:Universit=E6t G=F6rlitz
title:Mayor
title;language=de;value=text:Burgermeister
note:The Mayor of the great city of
  Goerlitz in the great country of Germany.
email;internet:mb@goerlitz.de
home.tel;type=fax,voice,msg:+49 3581 123456
home.label:Hufenshlagel 1234\n
 02828 Goerlitz\n
 Deutschland
key;type=X509;encoding=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQ
 AwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zI
 ENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0ZW1zMRwwGgYDVQQD
 ExNyb290Y2EubmV0c2NhcGUuY29tMB4XDTk3MDYwNjE5NDc1OVoXDTk3MTIwMzE5NDc
 1OVowgYkxCzAJBgNVBAYTAlVTMSYwJAYDVQQKEx1OZXRzY2FwZSBDb21tdW5pY2F0aW
 9ucyBDb3JwLjEYMBYGA1UEAxMPVGltb3RoeSBBIEhvd2VzMSEwHwYJKoZIhvcNAQkBF
 hJob3dlc0BuZXRzY2FwZS5jb20xFTATBgoJkiaJk/IsZAEBEwVob3dlczBcMA0GCSqG
 SIb3DQEBAQUAA0sAMEgCQQC0JZf6wkg8pLMXHHCUvMfL5H6zjSk4vTTXZpYyrdN2dXc
 oX49LKiOmgeJSzoiFKHtLOIboyludF90CgqcxtwKnAgMBAAGjNjA0MBEGCWCGSAGG+E
 IBAQQEAwIAoDAfBgNVHSMEGDAWgBT84FToB/GV3jr3mcau+hUMbsQukjANBgkqhkiG9
 w0BAQQFAAOBgQBexv7o7mi3PLXadkmNP9LcIPmx93HGp0Kgyx1jIVMyNgsemeAwBM+M
 SlhMfcpbTrONwNjZYW8vJDSoi//yrZlVt9bJbs7MNYZVsyF1unsqaln4/vy6Uawfg8V
 UMk1U7jt8LYpo4YULU7UZHPYVUaSgVttImOHZIKi4hlPXBOhcUQ==
end:vcard

8.4. Example 4 🧚

The last example is the multipart/related one 🫢 It uses the "uri" encoding to point at other body parts in the same message, or at external values. Once again there's no "profile" parameter, so the application might not know what kind of directory entity the info applies to πŸ™ˆ It also uses both the hypothetical official types and a bilaterally agreed upon type.

Content-Type: multipart/related;
        boundary=woof;
        type="text/directory";
        start="<id5@host.com>"
Content-ID: <id4@host.com>

--woof
Content-Type: text/directory; charset="iso-8859-1"
Content-ID: <id5@host.com>
Content-Transfer-Encoding: Quoted-Printable

source:ldap://cn=Bjorn%20Jensen,o=University%20of%20Michigan,c=US
cn:Bj=F8rn Jensen
sn:Jensen
email:bjorn@umich.edu
image;value=uri:cid:id6@host.com
image;value=uri;format=jpeg:ftp://some.host/some/path.jpg
sound;value=uri:cid:id7@host.com
phone:+1 313 747-4454

--woof
Content-Type: image/jpeg
Content-ID: <id6@host.com>

<...image data...>

--woof
Content-Type: message/external-body;
        name="myvoice.au";
        site="myhost.com";
        access-type=ANON-FTP;
        directory="pub/myname";
        mode="image"

Content-Type: audio/basic
Content-ID: <id7@host.com>

--woof--

9. Registration of new profiles 🌸

This section lays out the steps for registering new profiles with the IANA so the whole Internet community can use them 🌍 Non-IANA profiles can still be used by bilateral agreement, as long as their profile names follow the "X-" convention defined above πŸ’…

The procedures are built to allow public comment and review of new profiles, while only posing a small impediment to defining them. Gentle but thorough, bestie πŸŽ€

Registering a new profile happens through the following steps.

9.1. Define the profile ✨

A profile gets defined by filling in this template:

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME profile XXX

Profile name:

Profile purpose:

Profile types:

Profile special notes (optional):

Intended usage: (one of COMMON, LIMITED USE or OBSOLETE)

Here's what goes in each field πŸ’–

Profile name: This is the name as it will show up in the text/directory MIME Content-Type "profile" header parameter, or the predefined "profile" type name πŸ¦‹

Profile purpose: This is why the profile exists, like representing info about people, printers, documents, and so on. Keep it short but clear ✨

Profile types: This is the list of types associated with the profile. The list is expected, but not required in the profile, unless the profile definition says otherwise 🌷 Other types that aren't mentioned in the profile definition MAY also be present. Any new types the profile references MUST be defined separately, as described in Section 10 πŸ’œ

Profile special notes: Any special notes about the profile and how to use it. This part of the template can also set an ordering for the types that show up in the Content-Type, if an ordering is needed 🧚

9.2. Post the profile definition 🌈

The profile description must be posted to the new profile discussion list, ietf-mime-direct@imc.org πŸ“¬

9.3. Allow a comment period 🫢

Discussion on the new profile must be allowed to take place on the list for a minimum of two weeks. Consensus must be reached on the profile before proceeding to step 4 πŸ“

9.4. Submit the profile for approval πŸ“¬

Okay, so once the two-week comment period is over, and the proposer is convinced consensus has been reached on the profile, the registration application should be submitted to the Profile Reviewer for approval. πŸ’… The Profile Reviewer is appointed by the Application Area Directors and can either accept or reject the profile registration. ✨ If it's accepted, the Profile Reviewer passes it on to the IANA so it gets included in the official IANA profile registry. πŸŽ€

A registration may be rejected for any of these reasons. πŸ’€

  1. Insufficient comment period;
  2. Consensus not reached;
  3. Technical deficiencies raised on the list or elsewhere have not been addressed.

If the Profile Reviewer rejects a profile, the proposer can appeal that decision to the IESG. 🫢 Or, the proposer can deal with the objections that were raised and resubmit the profile. πŸ¦‹

10. Profile Change Control πŸ”„

Existing profiles can be changed using the same process they were registered with. 🌸

  1. Define the change
  2. Post the change
  3. Allow a comment period
  4. Submit the changed profile for approval

Quick note, bestie: the original author or any other interested party can propose a change to an existing profile, but those changes should only be proposed when there are serious omissions or errors in the published specification. πŸ‘€ The Profile Reviewer can object to a change if it isn't backwards compatible, but they aren't required to do so. πŸ’…

Profile definitions can never be deleted from the IANA registry. 😭 But profiles that are no longer believed to be useful can be declared OBSOLETE by changing their "intended use" field. 🧚

11. Registration of new types πŸŽ€

This section defines the procedures for registering new types with the IANA. πŸ’– Non-IANA types can be used by bilateral agreement, as long as the associated type names follow the "X-" convention defined above. 🌈

These procedures are designed to allow public comment and review of new types, while posing only a small impediment to defining new types. πŸ™ˆ

Registering a new type happens through the following steps. πŸ¦‹

11.1. Define the type ✍️

A type is defined by filling out the following template. πŸ“

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type XXX

Type name:

Type purpose:

Type encoding:

Type valuetype:

Type special notes (optional):

Intended usage: (one of COMMON, LIMITED USE or OBSOLETE)

Here's what each field in the template means. πŸ“

Type name: The name of the type, as it appears in the body of a text/directory MIME Content-Type "type: value" line, to the left of the colon ":".

Type purpose: The purpose of the type (for example, to represent a name, postal address, IP address, etc.). Give a short but clear description. ✨

Type encoding: The default encoding a value of the type must have in the body of a text/directory MIME Content-Type. πŸ”₯

Type valuetype: The format a value of the type must have in the body of a text/directory MIME Content-Type. This description has to be precise, and it must not violate the general encoding rules defined in section 5 of this document. 🫢

Type special notes: Any special notes about the type, how it's to be used, etc. πŸ’œ

11.2. Post the type definition πŸ“£

The type description must be posted to the new type discussion list, ietf-mime-direct@imc.org. πŸ’Œ

11.3. Allow a comment period πŸ’¬

Discussion on the new type must be allowed to take place on the list for a minimum of two weeks. Consensus must be reached on the type before moving on to step 4. 🌷

11.4. Submit the type for approval πŸ†

Once the two-week comment period is over, and the proposer is convinced consensus has been reached on the type, the registration application should be submitted to the Profile Reviewer for approval. πŸ’… The Profile Reviewer is appointed by the Application Area Directors and can either accept or reject the type registration. ✨ If it's accepted, the Profile Reviewer passes it on to the IANA for inclusion in the official IANA profile registry. πŸŽ€

The registration can be rejected for any of these reasons. πŸ’€

  1. Insufficient comment period;
  2. Consensus not reached;
  3. Technical deficiencies raised on the list or elsewhere have not been addressed.

If the Profile Reviewer rejects a type, the proposer can appeal that decision to the IESG. 🫢 Or, the proposer can address the objections raised and resubmit the type. πŸ¦‹

12. Type Change Control πŸ”„

Existing types can be changed using the same process they were registered with. 🌸

  1. Define the change
  2. Post the change
  3. Allow a comment period
  4. Submit the type for approval

Again, the original author or any other interested party can propose a change to an existing type, but those changes should only be proposed when there are serious omissions or errors in the published specification. πŸ‘€ The Profile Reviewer can object to a change if it isn't backwards compatible, but they aren't required to do so. πŸ’…

Type definitions can never be deleted from the IANA registry. 😭 But types that are nolonger believed to be useful can be declared OBSOLETE by changing their "intended use" field. 🧚

13. Registration of new parameters 🌟

This section defines the procedures for registering new parameters with the IANA and making them available to the Internet community. πŸ’– Non-IANA parameters can be used by bilateral agreement, as long as the associated parameter names follow the "X-" convention defined above. 🌈

These procedures are designed to allow public comment and review of new parameters, while posing only a small impediment to defining new parameters. πŸ™ˆ

Registering a new parameter happens through the following steps. πŸ¦‹

13.1. Define the parameter ✍️

A parameter is defined by filling out the following template. πŸ“

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME type parameter XXX

Parameter name:

Parameter purpose:

Parameter values:

Parameter special notes (optional):

Intended usage: (one of COMMON, LIMITED USE or OBSOLETE)

Here's the explanation of what goes in each field. πŸ“

Parameter name: The name of the parameter as it appears in the text/directory MIME Content-Type. πŸŽ€

Parameter purpose: The purpose of the parameter (for example, to represent the format of an image, or the type of a phone number, etc.). Give a short but clear description. If you're defining a general paramemter like "format" or "type", keep in mind that other applications might want to extend its use. πŸ‘‘

Parameter values: The list or description of values associated with the parameter. πŸ“‹

Parameter special notes: Any special notes about the parameter, how it's to be used, etc. πŸ’œ

13.2. Post the parameter definition πŸ“£

The parameter description must be posted to the new parameter discussion list, ietf-mime-direct@imc.org. πŸ’Œ

13.3. Allow a comment period πŸ’¬

Discussion on the new parameter must be allowed to take place on the list for a minimum of two weeks. Consensus must be reached on the parameter before moving on to step 4. 🌷

13.4. Submit the parameter for approval πŸ†

Once the two-week comment period is over, and the proposer is convinced consensus has been reached on the parameter, the registration application should be submitted to the Profile Reviewer for approval. πŸ’… The Profile Reviewer is appointed by the Application Area Directors and can either accept or reject the parameter registration. ✨ If it's accepted, the Profile Reviewer passes it on to the IANA for inclusion in the official IANA parameter registry. πŸŽ€

The registration can be rejected for any of these reasons. πŸ’€

  1. Insufficient comment period;
  2. Consensus not reached;
  3. Technical deficiencies raised on the list or elsewhere have not been addressed.

If the Profile Reviewer rejects a profile, the proposer can appeal that decision to the IESG. 🫢 Or, the proposer can address the objections raised and resubmit the parameter registration. πŸ¦‹

14. Parameter Change Control πŸ”„

Existing parameters can be changed using the same process they were registered with. 🌸

  1. Define the change
  2. Post the change
  3. Allow a comment period
  4. Submit the parameter for approval

Note that the original author or any other interested party can propose a change to an existing parameter, but those changes should only be proposed when there are serious omissions or errors in the published specification. πŸ‘€ The Profile Reviewer can object to a change if it isn't backwards compatible, but they aren't required to do so. πŸ’…

Parameter definitions can never be deleted from the IANA registry. 😭 But parameters that are nolonger believed to be useful can be declared OBSOLETE by changing their "intended use" field. 🧚

15. Registration of new value types πŸ¦„

This section defines the procedures for registering new value types with the IANA and making them available to the Internet community. πŸ’– Non-IANA value types can be used by bilateral agreement, as long as the associated value type names follow the "X-" convention defined above. 🌈

These procedures are designed to allow public comment and review of new value types, while posing only a small impediment to defining new value types. πŸ™ˆ

Registering a new value type happens through the following steps. πŸ¦‹

15.1. Define the value type ✍️

A value type is defined by filling out the following template. πŸ“

To: ietf-mime-direct@imc.org
Subject: Registration of text/directory MIME value type XXX
value type name:

value type purpose:

value type format:

value type special notes (optional):

Intended usage: (one of COMMON, LIMITED USE or OBSOLETE)

Here's the explanation of what goes in each field. πŸ“

value type name: The name of the value type as it appears in the text/directory MIME Content-Type. πŸŽ€

value type purpose: The purpose of the value type. Give a short but clear description. ✨

value type format: The definition of the format for the value, usually written using ABNF grammar. 🧠

value type special notes: Any special notes about the value type, how it's to be used, etc. πŸ’œ

15.2. Post the value type definition πŸ“£

The value type description must be posted to the new value type discussion list, ietf-mime-direct@imc.org. πŸ’Œ

15.3. Allow a comment period πŸ’¬

Discussion on the new value type must be allowed to take place on the list for a minimum of two weeks. Consensus must be reached before moving on to step 4. 🌷

15.4. Submit the value type for approval πŸ“¬

okay so once the two-week comment period is over and the proposer is convinced consensus has been reached on the value type, the registration application should be submitted to the Profile Reviewer for approval πŸ’…. The Profile Reviewer is appointed by the Application Area Directors and can either accept or reject the value type registration πŸ‘‘. An accepted registration should be passed on by the Profile Reviewer to the IANA for inclusion in the official IANA value type registry ✨.

The registration can be rejected for any of the following reasons πŸ™ˆ

  1. Insufficient comment period
  2. Consensus not reached
  3. Technical deficiencies raised on the list or elsewhere have not been addressed

The Profile Reviewer's decision to reject a profile can be appealed by the proposer to the IESG, or the objections raised can be addressed by the proposer and the value type registration resubmitted πŸ¦‹


16. Security Considerations πŸ”

ngl this one is seriously important bestie 😭 Internet mail is subject to many well known security attacks, including monitoring, replay, and forgery. Any directory service needs to be careful about letting information leave the scope of the service itself, because once that happens, any access controls can no longer be guaranteed 🚨. Applications should also take care to display directory data in a "safe" environment (e.g., PostScript-valued types) πŸ’€


17. Acknowledgements 🫢

The registration procedures defined here were shamelessly lifted from the MIME registration RFC πŸ₯Ή no shame, honestly iconic.

The many valuable comments contributed by members of the IETF ASID working group are gratefully acknowledged, as are the contributions of the Versit Consortium πŸ’œ Chris Newman was especially helpful in navigating the intricacies of ABNF lore 🧚


18. References πŸ“š

[RFC-1777]   Yeong, W., Howes, T., and S. Kille, "Lightweight
             Directory Access Protocol", RFC 1777, March 1995.

[RFC-1778]   Howes, T., Kille, S., Yeong, W., and C. Robbins, "The
             String Representation of Standard Attribute Syntaxes",
             RFC 1778, March 1995.

[RFC-822]    Crocker, D., "Standard for the Format of ARPA Internet
             Text Messages", STD 11, RFC 822, August 1982.

[RFC-2045]   Borenstein, N., and N. Freed, "Multipurpose Internet
             Mail Extensions (MIME) Part One: Format of Internet
             Message Bodies", RFC 2045, November 1996.

[RFC-2046]   Moore, K., "Multipurpose Internet Mail Extensions (MIME)
             Part Two:  Media Types", RFC 2046, November 1996.

[RFC-2048]   Freed, N., Klensin, J., and J. Postel, "Multipurpose
             Internet Mail Extensions (MIME) Part Four: Registration
             Procedures", RFC 2048, November 1996.

[RFC-1766]   Alvestrand, H., "Tags for the Identification of
             Languages", RFC 1766, March 1995.

[RFC-2112]   Levinson, E., "The MIME Multipart/Related Content-type",
             RFC 2112, March 1997.

[X500]       "Information Processing Systems - Open Systems
             Interconnection - The Directory: Overview of Concepts,
             Models and Services", ISO/IEC JTC 1/SC21, International
             Standard 9594-1, 1988.

[RFC-1835]   Deutsch, P., Schoultz, R., Faltstrom, P., and C. Weider,
             "Architecture of the WHOIS++ service", RFC 1835, August
             1995.

[RFC-1738]   Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
             Resource Locators (URL)", RFC 1738, December 1994.

[MIME-VCARD] Dawson, F., and T. Howes, "VCard MIME Directory
             Profile", RFC 2426, September 1998.

[VCARD]      Internet Mail Consortium, "vCard - The Electronic
             Business Card", Version 2.1,
             http://www.imc.com/pdi/vcard-21.txt, September, 1996.

[RFC-2119]   Bradner, S., "Key words for use in RFCs to Indicate
             Requirement  Levels", BCP 14, RFC 2119, March 1997.

[RFC-2234]   Crocker, D., and P. Overell, "Augmented BNF for Syntax
             Specifications: ABNF", RFC 2234, November 1997.

19. Authors' Addresses πŸ–ŠοΈ

Tim Howes
Netscape Communications Corp.
501 East Middlefield Rd.
Mountain View, CA 94041
USA

Phone: +1.415.937.3419
EMail: howes@netscape.com


Mark Smith
Netscape Communications Corp.
501 East Middlefield Rd.
Mountain View, CA 94041
USA

Phone: +1.415.937.3477
EMail: mcs@netscape.com


Frank Dawson
Lotus Development Corporation
6544 Battleford Drive
Raleigh, NC 27613
USA

Phone: +1-919-676-9515
EMail: frank_dawson@lotus.com

Copyright (C) The Internet Society (1998). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 🌈

πŸ“¦ where this page comes from