Skip to main content

2.1. Document

The structured format of a document is built on the basic data elements used in the Internet Message Protocol [1].

The document is a property list of <name,value> pairs called fields. A few fields are specifically required and many are optional. Some of the field values are simple and a few are quite complicated. In particular the body value may be highly structured.

Older message systems have considered the document to be divided into a header and a body, and have used keywords to indicate specific header fields (e.g., date, to, subject). Roughly speaking, this functionality is provided in this new structured format by considering the name part of the <name,value> pair to be a keyword. In addition, this new structured format eliminates the separate treatment of the body.

It is impossible to foresee the many forms documents will take so the standard for a document header must be flexible. The approach here is to define a set of basic fields and allow addition of whatever fields are necessary. Features added in this fashion may not be understood by others.

The minimum document is a property list of the following fields:

Name     Value
---- -----
DATE date string (name)
SENDER a mailbox
SUBJECT subject string (text)
BODY a data structure

A typical document is a property list containing the following fields:

Name     Value
---- -----
DATE date string (name)
SENDER a mailbox
FROM list of mailboxes
TO list of mailboxes
CC list of mailboxes
SUBJECT subject string (text)
BODY a data structure

An elaborate document might contain the following fields:

Name        Value
---- -----
DATE date string (name)
SENDER a mailbox
FROM list of mailboxes
TO list of mailboxes
CC list of mailboxes
BCC list of mailboxes
REPLY-TO list of mailboxes
SUBJECT subject string (text)
COMMENTS comment string (text)
MESSAGE-ID message identifier of this message (text)
IN-REPLY-TO message identifier of previous message (text)
REFERENCES message identifiers of other messages (text)
KEYWORDS key terms used in this message (text)
BODY a data structure

One of the key objects is the mailbox. It appears in the sender, from, to, cc, bcc, and reply-to fields. The mailbox is a property list of objects that combine to specify a destination recipient for a message. Most of the <name,value> pairs that make up a mailbox are identical to those used in the deliver command in the Internet Message Protocol [1]. A few additional <name,value> pairs are defined for use in a mailbox in the document context. In particular, there is a field for the real name of a person in contrast to the "user name" which identifies a computer account.

In addition there is a field to specify a distribution group name. Such group names are used to indicate that a document is being sent to a group of recipients. This essentially presents an alternate form for a mailbox which consists of the single <name,value> pair for the group name. There is no required relationship between a group name mailbox and other mailboxes in the same list.

For example, all of the following situations are allowed:

  • a mailbox list consisting of a single mailbox specifying a particular user,
  • a mailbox list consisting of a single mailbox with a group name,
  • a mailbox list consisting of a mailbox with a group name and a mailbox specifying a particular user, with either the user in or not in the group,
  • a mailbox list consisting of a mailbox with a group name and a several mailboxes specifying a particular users, with some users in the group and some not,
  • a mailbox list consisting of several mailboxes specifying group names and a several mailboxes specifying a particular users, with some users in the groups and some not.