Header

The header can appear in the top-level message or the individual message parts. It is represented in the stream as follows:


<Header>
Content-Type: type; attr1="val1"; attr2="val2" ...
Content-Transfer-Encoding: base64 | quoted-printable        
Encryption: SMIME(commands) | PGP(commands)
Content-ID: id
Content-Description: description
Extra-Header1: value1; attr1="val1"; attr2="val2" ...
Extra-Header2: value2; attr1="val1"; attr2="val2" ...
Boundary: OptionalTerminatingString
</Header>

The <Header> contains information about the content and the chosen encoding. The Content-Type, Content-ID, Content-Description and any additional header values, shown above as Extra-Header1 and Extra-Header2, are copied without processing to the resultant MIME message.

Note that these can have any number of attributes. Content-Transfer-Encoding specifies an encoding scheme which is either Base64 or Quoted-Printable. The specified Content-Transfer-Encoding will be applied to the message data before any Encryption commands are applied to it.

The Encryption field instructs the MIME Adapter as to which adapter to invoke to perform data encryption. The encoding scheme might optionally be followed by parameters, (these are adapter commands that are passed directly to the adapter).

If the Boundary value is specified, it is added as an attribute of the Content-Type field in the resulting MIME message, and is used in the part delimiter of the multipart messages.

The adapter looks specifically for the following Content-Types:

  • application/pkcs7-mime (encrypted or signed SMIME data)
  • multipart/signed (a multipart message where the last part is a detached signature)
  • application/pkcs7-signature (the message part is the detached signature)
  • application/pgp-encrypted (PGP encrypted data)
  • application/pgp-signature (PGP signed data)

It also looks for any Content-Type that begins with multipart/ to determine if the resulting MIME message should have a multipart structure with boundary delimiters.

In the case that Content-Type is application/pkcs7-mime, the adapter checks the attributes of the Content-Type header field and looks for smime-type=signed-data or smime-type=enveloped-data. Signed-data indicates that the message has an encapsulated signature. Enveloped-data indicates that the message is encrypted and possibly signed. Otherwise, the Content-Type is not interpreted by the MIME Adapter.