Recognizing and De-Encapsulating IMCEA-Encapsulated Addresses

For details about IMCEA encapsulation, see section De-encapsulation SHOULD<108> be attempted only if the domain part of the encapsulated address is recognized as local or otherwise able to deliver mail to the de-encapsulated address.

An IMCEA-encapsulated SMTP address consists of the following six elements:

  1. The literal string "IMCEA" in any combination of uppercase or lowercase letters.

  2. The original address type; one or more ASCII characters.

  3. A literal hyphen character, U+002D.

  4. The encoded original address. Legal characters are uppercase and lowercase ASCII letters, digits, hyphen (U+002D), equal sign (U+003D), underscore (U+005F), and plus sign (U+002B). Any other characters MUST be encoded as a plus sign (U+002B) followed by two hexadecimal digits.

  5. A literal "@" sign, U+0040.

  6. The encapsulation domain, such as "example.com".

To identify an e-mail address as IMCEA-encapsulated, it is sufficient to match elements 1-3.

To obtain the original e-mail address and type from an encapsulated address, use the following procedure:

  1. Copy element 2 to the e-mail address type.

  2. Extract element 4, the encoded e-mail address.

  3. Decode element 4 by replacing any underscore (U+005F) with a forward slash (U+002F), and replacing any sequence of plus sign (U+002B) followed by two hexadecimal digits with the single character that the two hexadecimal digits represent.