Mail formats

Mail formats


AT&T mail

The following table shows the headers which are of importance to the conversion routines.
Mail Header Meaning Notes
Message-Version: Format version of AT&T mail Only version 2 messages are currently supported
Messages without a Message-Version: line are not converted
Content-Type: Message type - either TEXT or MULTIPART TEXT messages are ASCII text and are not converted
MULTIPART messages must be converted from binary to UUENCODE
Content-Length: Length in bytes of the body of the message Does not include the blank line after the headers
Not-Delivered-To: Delivery failure notice from AT&T mail Copied into body of message with an explanatory heading

The general format of an AT&T mail message is shown below. Note that the body can contain any binary data, including NULL characters.

	HEADERS
	Message-Version: 2
	HEADERS
	Content-Type: TEXT | MULTIPART
	Content-Length: [Number of bytes to end of message - 1]
	BLANK LINE
	BODY [See details under TEXT and MULTIPART messages]
Here is an example AT&T mail message with two short attachments.

TEXT messages

Text messages are purely Content-Length: bytes of ASCII text. These are passed through the gateway without conversion. The body of the message starts after the blank line after the headers.

MULTIPART messages

Multipart messages are composed of multiple body parts. Each bodypart has the following format:
	Content-Type: TEXT | BINARY
	Content-Name: [Name of body part - optional on TEXT body parts]
	Content-Abstract: [Description of body part - always optional]
	Content-Length: [Number of bytes to end of part]
	BLANK LINE
	Contents of this part
	BLANK LINE
Text bodyparts are purely Content-Length: bytes of ASCII text, and do not have a Content-Name: header. These bodyparts are passed through the gateway without conversion. Note: Text bodyparts are only those with the single word Text.

Special text formats, e.g. Content-Type: text/tab-separated-values; charset=us-ascii are treated like binary attachments. Special text formats are used for text file attachments, and will alwasy have a Content-Name:.

If the Content-Type: is Binary or anything other than Text, the bodypart is Content-Length:bytes of binary data. The data may contain any value, including nulls. These bodyparts are converted to ASCII with UUENCODE. The Content-Name: is used as the name of the UUENCODEd attachment. The Content-Abstract: has no equivalent in MSMAIL, and is lost.

MSMAIL also details the date and time of the attachment. These are not available from AT&T mail, and so the date and time of conversion is used instead.


MSMAIL/SMTP format

The gateway expects all messages from the MSMAIL/SMTP gateway to have the Encoding: header. Messages without this header are sent without conversion. The following headers are used during the conversion process:

Mail Header Meaning Format Notes
Encoding: Number of lines and type of each bodypart nnnnn TEXT
[, nnnnn [TEXT|UUENCODE]]*
No conversion is performed if this header is missing. The initial bodypart is always TEXT.
X-Ms-Attachment: Details of the attachments - name, size, date of creation NAME SIZE MM-DD-YYYY HH:MM One header exists per entry in the Encoding: line, except for the initial body part, which is always TEXT.
Received: SMTP delivery logs Dependent on the SMTP server These headers must be stripped before passing to AT&T mail

The general format of an MSMAIL/SMTP message is shown below. The first bodypart is always text, and other bodyparts are text or UUENCODEd attachments. Each bodypart is separated by a single blank line, with no extra headers.

	HEADERS
	Encoding: nnnnn TEXT [, nnnnn [TEXT | UUENCODE]]*
	HEADERS
	X-Ms-Attachment: NAME SIZE MM-DD-YYYY HH:MM [one per bodypart]
	BLANK LINE
	TEXT BODY
	BLANK LINE
	OTHER BODY PART as detailed in X-Ms-Attachment: and Encoding: headers
	BLANK LINE
Here is an example Microsoft mail message with two short attachments