2.2.2 SMTP Server Messages

This section defines the creation of SMTP_AUTH_NTLM_BLOB_Response messages. These are NTLM messages that are sent by the server, and MUST be encapsulated as follows to conform to syntax specified by the SMTP-AUTH mechanism:

  1. Encode the NTLM message data as base64 (as specified in [RFC1521]). This is required because NTLM messages contain data outside the ASCII character range whereas SMTP only supports the sending of ASCII characters within the context of SMTP-AUTH.

  2. To the base64-encoded string, prefix the SMTP response code "334 " (that is, the numerals 334 followed by the ASCII space character 0x20).

  3. Suffix the <CR> and <LF> characters (ASCII values 0x0D and 0x0A), as required by SMTP.

The definition of a server message is as follows:

         334 <base64-encoded-NTLM-message><CR><LF>

De-encapsulation of these messages by the client follows the reverse logic:

  1. Remove the <CR> and <LF> characters (ASCII values 0x0D and 0x0A).

  2. Remove the SMTP response code "334" (that is, the numerals 334 followed by the ASCII space character 0x20).

  3. base64 decode the SMTP data to produce the original NTLM message data.