Difference between the Active Directory User class' E-mail-Addresses attribute vs. the Proxy-Address attribute

active-directory, exchange-server

Solution

You may find the following useful, from http://blogs.technet.com/b/exchange/archive/2005/01/10/350132.aspx

E-Mail Address Attributes

Exchange stores and uses information about the e-mail addresses of a recipient in the following attributes: proxyAddresses

This is the main attribute where e-mail address information is kept. When you open the properties of a recipient in Outlook and look at the "E-mail Addresses" tab, you are looking at this attribute. This is a multi-valued string containing all the addresses that represent the recipient. Each value must have the following format:

  type:address

For example:

  SMTP:nospam@online.microsoft.com

When the type is in uppercase letters, the address is considered to be the primary address of that type and it is used as the default reply address of that recipient. When the type is in lowercase letters, the address is considered a secondary address and is used to resolve addresses during e-mail delivery, allowing the same recipient to receive e-mails directed to different e-mail addresses.

Problem

I am using the Proxy-Address attribute as a primary means of determining the user's email address (where I only care about the addresses prefixed with "SMTP:" or "smtp:" and, furthermore, I am using the address prefixed with an uppercase SMTP to determine the primary address - this is not 100% reliable, but it's a limitation of an existing system). I was informed that this attribute (Ldap-Display-Name = mail, CN = E-mail-Addresses) can be used as a fall back, to determine a user's email addresses (if no smtp addresses can be found under the Proxy-Address attribute(s)), but I can't find examples of multiple addresses for this attribute. The MSDN documentation indicates that the E-mail-Address attribute should be `"the list of email addresses for a contact"`. In all the examples I am finding, there is only a single address and it is not prefixed with "SMTP:" or "smtp:" so I am unsure how one would determine the primary email address unless the reality is that the mail attribute should only ever be a single address?

Original source