Script to create/update mail-enable Contacts & LegacyDN


Two ways to create mail-enable Contacts in E2K3 & E2K7 mixed environments:

 

Option 1:

               if not len(strEMail) = 0 then

                        objContact.MailEnable strEmail

                         objContact.Put "targetAddress", strTarAddr

                         objContact.Put "mailNickname", strAlias

               end if

 

Option 2:

               if not len(strEMail) = 0 then

                        objContact.Put "mail", strEmail

                        objContact.Put "legacyExchangeDN", strLegacyDN

                         objContact.Put "targetAddress", strTarAddr

                         objContact.Put "mailNickname", strAlias

               end if

 

Notes:

a. for both options,  mailNickname is a must, otherwise the creation will be failure.

 

b. For option 1,  the legacyDN will be auto created based on the recipient policies, and it will be sth like /o=YAK/ou=HeadOffice//cn=Recipients/cn=mailNickname.

          The issue for option 1 is that if any changes in mailNickname in future, you will encounter problem in item c)

 

c. For option 2, legacyExchangeDN is a must. Without it, the creation is OK, but you can not send emails to this contact.

   Error: The message could not be delivered because the recipient’s destination email system is unknown or invali 

 

d. for option 2, it is advised to set the cn=strMail which is unique to this mail-enable contact.

 

e. MS Exchange Transport Suite for Domino generate the legancyDN is using Notes UID as the cn, i.e /o=YAK/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=26c018e9-614abd05-4825747a-12a027 and its notes proxyAddress is: notes:UID=26c018e9-614abd05-4825747a-12a027

 

f. How does legacyDN affect outlook client ?   http://blog.shijaz.com/2008/07/managing-changes-to-legacyexchangedn.html

 

g. KB324606 How to use Legacydn.exe to correct Exchange organization names or Administrative Group names in Exchange Server 2003 or in Exchange 2000 Server

http://support.microsoft.com/default.aspx?scid=kb;en-us;324606

 

 

Advertisements
This entry was posted in MS Exchange. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s