Chapter 3
Directory Import and Export
The Microsoft Exchange Server directory contains objects, which include mailboxes, custom recipients, distribution lists, and public folders. To quickly make thousands of changes to these directory objects, you can use the Directory Import and Directory Export commands on the Tools menu in the Administrator program.
The Directory Export command creates a text file with information about directory objects. With the Directory Import command, you can create or change the properties or schema attributes of directory objects. (See Appendix D for a list of schema attributes.) This chapter explains how to use these commands to perform the following migration-related tasks:
	Establish or change naming conventions.
	Create or change e-mail addresses.
	Create or change distribution lists.
	Maintain directories.
	Convert network accounts to mailboxes.
	Remove migrate addresses.

You can also use these commands to import information from other databases. For example, your personnel department has information about users, such as their job titles, manager names, and department names, that you can import to the directory.
If you cannot perform the migration by using a source extractor with the Migration Wizard, you can use the Directory Import command to migrate mailboxes (but not messages) and custom recipients. 
For more information about directory import and export, see the Microsoft Exchange Server Administrator’s Guide.

Establishing or Changing Naming Conventions
When you migrate from one system to another, you have the chance to change your directory information to a consistent format. The easiest way to establish or change your organization’s naming conventions is to use the Directory Import command. This section discusses strategies for naming the following:
	Display names of mailboxes and distribution lists.
	Aliases, directory names, and Windows NT account names.
	Given names and surnames.

Display Names
The Address Book sorts and displays recipients by display name. The display name is also used to verify recipient names before message are sent. When designing your naming convention for mailbox display names, check the naming conventions used in your corporate phone directory. Also consider these naming convention issues:
	Consistency.
	Sort order.
	Unique information about recipients, such as department information or nicknames.
	Qualifiers, such as Jr., III, and Ph.D.
	Identification of contract employees, permanent employees, vendors, or others.

The following strategies can be used to design your naming convention for display names of distribution lists:
	Use the same naming conventions as the existing system, for ease of transition.
	Use a symbol for the first character, for sorting purposes.
	Indicate the size of the distribution list. (For example, all uppercase for large, initial caps for medium, and all lowercase for small.)
	Indicate the type of distribution list, such as:
	Members only, or open to anyone.
	Social, organizational (team, group, department, division), or informational.
	For permissions use only. 
	For external use.

For example, if a company wants its distribution lists to sort together and to indicate their type and size, the resulting naming convention would be: DL <Type> <Level (if org)> name.
Following are examples of distribution list names using the above naming convention:
	DL ORG DIV Sales
	DL ORG Team Region 1 Sales
	DL SOC Bridge Players
	DL INF Competition LitWare, Inc.

Aliases, Directory Names, and Windows NT Account Names
You can create mailboxes and associated Windows NT accounts at the same time, either with the Migration Wizard or with the Directory Import command. Each mailbox has an alias, which can be changed later, and a directory or common name, which can’t be changed. 
By default, the alias is used to create e-mail addresses. The directory name is used for all directory imports. Both of these names are limited to 64 characters. The Windows NT account has a full name and a user or account name, both of which can be changed later. The account name is limited to 20 characters. The user name is used by logon scripts and network logon dialog boxes. Consider these strategies for relating these properties:
Use the same name for the alias, directory name, and Windows NT account name.
This strategy is easy to remember and eases the administration of both systems.
Use the same name for the directory and the Windows NT account, but use a different name for the alias.
The alias is part of the e-mail name and is visible to those inside and outside of the company. The Windows NT account name, which controls access to the network, is hidden from everyone except the user and the administrator, increasing the security of the system. For ease of administration, the directory name and the Windows NT account name are the same.
Use different names for all of them.
The employee ID or social security number can be used for the directory name, since they do not change. This also makes it easy to import from a personnel database. You can change the alias and the Windows NT account can be administered separately.
Given Names and Surnames
Some migration tools do not separate the given name from the surname. Therefore, you may want to parse the display name, which makes it easier to search the Address Book. To determine parsing rules, consider the following:
	Double first names, such as Betty Jo.
	Double last names, such as Smith Olsen.
	Double middle initials, such as E. D.
	Qualifiers, such as Jr., III, or Ph.D.

	To parse names into given names and surnames
	1.	Select Directory Export from the Tools menu and specify a file with the following header:
obj-class,mode,common-name,display-name,given-name,initials,surname,alias name

	2.	Edit the exported file as follows:
	Add modify to the mode field.
	Parse the display name and put the results in the appropriate columns.
	3.	Import the edited file.

Creating or Changing E-Mail Addresses
Microsoft Exchange Server recipients can have multiple addresses of any type. This allows you to support old address naming conventions while moving to new address naming conventions.
For example, a user can have three SMTP addresses. Only one is used when the mailbox sends a message through the Internet Mail Connector, but users can use any of the addresses to send mail to the mailbox. The primary address is indicated by uppercase characters; the secondary addresses are indicated by lowercase characters.
Creating the Primary Address
You create the primary address as follows:
Situation	How address is created	
		
Specified in the directory import, account list, or migration file.	Matches specified address, as long as it is unique in the directory.	
Not specified when mailbox or custom recipient is migrated or created.	Automatically generated, based on settings in the Site Addressing object’s Site Addressing property page.	
After recipients are created, settings in the Site Addressing object’s Site Addressing property page are changed.	Automatically generated, based on the new settings.	

Replacing the Primary Address
If primary addresses are automatically generated, you may want a different address format, or you may want recipients to have the same addresses as that of their old mailboxes on the existing system.
The primary address is used for all outbound mail. You can add the old primary address as a secondary address. The primary address for each type cannot be removed, nor can there be more than one primary address of a given type.
	To replace the primary address
	1.	Create a text file with the following header:
Obj-class,mode,common-name
	2.	Export the recipients from this site for which you want to replace primary addresses. 
	3.	Since you are replacing the address, make a backup of the exported file.
	4.	Edit the exported file as follows:
	Add modify to the mode field.
	Add a field called proxy-addresses.
	Add the new primary e-mail addresses, separating each by a % symbol, to 	the proxy-addresses field.
	5.	Import the edited file, selecting the Append options for multivalued properties.

The addresses in the modified file replace the primary addresses for the recipients.
Creating Secondary Addresses
You create secondary addresses when the recipient is created, by using the Directory Import command, or one at a time, with the Administrator program. 
For more information about adding an address with the Administrator program, see Chapter 4 of the Microsoft Exchange Server Administrator’s Guide.
This section explains how to create secondary addresses by using the Directory Import command. Secondary addresses can be added to any existing secondary addresses. 
	To create a secondary address
	1.	Create a text file with the following header:
Obj-class,mode,common-name
	2.	Export the recipients from the site to which you want to add
secondary addresses. 
	3.	Edit the exported file as follows:
	Add modify to the mode field.
	Add a field called secondary-proxy-addresses.
	Add the secondary addresses, separating each by a % symbol, to the 	secondary-proxy-addresses field.
	4.	Import the edited file, selecting the Append options for multivalued properties.

The addresses in the modified file add the appropriate addresses to the recipients.
Changing or Removing Secondary Addresses
Use the same procedure to change or remove secondary addresses. All existing secondary addresses need to be replaced with the updated list of secondary addresses.
	To change or remove secondary addresses
	1.	Create a text file with the following header:
Obj-class,mode,common-name,secondary-proxy-addresses
	2.	Export the recipients from the site for which you want to remove or modify the secondary addresses.
	3.	Since you are replacing all secondary addresses, make a backup of the
exported file.
	4.	Edit the exported file as follows:
	Add modify to the mode field.
	Remove or modify the secondary address. Don’t remove the
	other addresses.
	5.	Import the edited file, selecting the Overwrite options for multivalued properties.

Creating or Changing Distribution Lists
To create and change distribution lists, use the Directory Import command.
Creating Distribution Lists
For each new distribution list, you should define at least four fields in the directory import file: 
Obj-Class
Must be the first field in the header. Each data line has this value set to DL.
Display Name
Not strictly required, unless you are trying to maintain a naming convention.
Directory Name
You can use the key word common name. The directory name must be unique in the Recipients container.
Members
Lists each member by their directory names. If you have multiple Recipients containers, you should also include the Recipients containers’ names.
Other fields can also be added. Here are some sample directory import files for creating distribution lists:
Obj-Class, Display Name, Directory Name, Members
dl,zSales,Sales,Recipients/cn=BillL%Recipients/cn=BrentJ%Recipients/cn=PaulBorm

Obj-Class, Display Name, Common-Name, Members
dl,DL-Social-Sports Fans,DLSOCSP,BillL%BrentJ%PaulBorm
dl,DL-Org Network Ops,DLorgNO,ShannonB%BrentJ

Obj-Class, Display Name, Directory Name, Members,Owner,Hide From AB
dl,DL-Org Network Ops,DLorgNO,ShannonB%BrentJ,BrentJ,0
dl,Presidents Group,pg,PaulBorm%BillL,,1

Using Directory Information to Create Distribution Lists
You can create distribution lists with directory information. There are many reasons to use this option, for example:
	Your existing system doesn’t have distribution lists.
	Distribution lists are difficult to migrate from your existing system.
	You want distribution lists to be nested or to be in a hierarchy, neither of which can be accomplished with your existing system.

For example, you can create distribution lists based on directory attributes such as manager name, department name, office location, or title.
	To create distribution lists from manager name information
	1.	Using the Directory Export command, export custom recipients and mailboxes to a file with the following header:
obj-class,common-name,department,reports,display-name,manager
	2.	Edit the exported file as follows:
	Sort the file by reports.
	Delete all entries with no reports.
	Delete the common–name column.
	Change reports header to members, change manager to owner, and 	change 	department to common–name.
	Add some text before the data in the common–name field to make each 	value unique.
	Append ’s Direct Reports to the display name.
	Change obj-class to DL.
	3.	Import the edited file.

Changing Distribution Lists
You may want to add or remove members of a distribution list. You can either change the distribution list, or you can change the recipient by adding a distribution list to the recipient. This section discusses adding or removing members by changing the distribution list. 
	To change a distribution list
	1.	Select Directory Import from the Tools menu.
	2.	Use the Mode field as the second field in the header, and set it to modify.
	3.	In the Directory Import dialog box, set the Multivalue Field setting to Append.

Adding Members to Distribution Lists
The following are sample directory import files for adding members to distribution lists:
Obj-Class,Mode,Directory Name, Members
dl,modify,Sales,Recipients/cn=ShannonB%Recipients/cn=DFunk

Obj-Class, Mode, Directory Name, Members
dl,modify,DLSOCSP,ShannonB
dl,modify,DLorgNO,BillL%DFunk

Obj-Class, Mode, Common-Name, Members,
dl,modify,DLorgNO,DFunk
dl,modify,pg,DFunk

For example, the following import file adds the new mailbox DFunk to the distribution lists LorgNO and PG:
obj-class,mode,common-name,members
mailbox,modify,DFunk,LorgNO%PG

You can also use this format to add mailboxes, distribution lists, and custom recipients to distribution lists as they are created:
obj-class,mode,common-name,target-address,members
remote,create,HOWARDS,PROFS:SANFRAN(HOWARDS),LorgNO%PG

Removing Members of Distribution Lists
To remove recipients from distribution lists, you can modify the distribution lists, or you can modify the recipients.
	To remove members by modifying distribution lists
	1.	Create a text file with the following header:
obj-class,mode,common-name,members
	2.	Export distribution lists to this file.
obj-class,mode,common-name,members
dl,,LorgNO,DFunk%Howards%BillL
dl,,pg,DFunk%Howards%BillL%BrentJ
	3.	Add Modify to all mode fields. Delete the users’ common names from the appropriate distribution lists.
obj-class,mode,common-name,members
dl,modify,LorgNO,DFunk%Howards
dl,modify,pg,DFunk%Howards%BrentJ
	4.	Import the modified file with the Multivalued Properties set to Overwrite.

	To remove members by modifying the recipients
	1.	Create a text file with the following header:
obj-class,mode,common-name,members
	2.	Export to this file.
obj-class,mode,common-name,members
mailbox,,DFunk,LorgNO%PG
remote,,Howards,PG%Sales
	3.	Add Modify to all mode fields. Delete the distribution lists’ common names from the appropriate recipients.
obj-class,mode,common-name,members
mailbox,mode,DFunk,LorgNO
remote,mode,Howard,Sales
	4.	Import the modified file with the Multivalued Properties set to Overwrite.

Maintaining Directories
Directory maintenance is an important part of multi-phase migration. If the existing system doesn’t support the MS Mail directory synchronization feature, use the Directory Import and Directory Export commands to update the directories.
There are two steps to maintaining directories:
	Importing custom recipients into Microsoft Exchange Server.
	Exporting recipient information from Microsoft Exchange Server to the existing system.

Some source extractors support exporting directory information from the existing system and importing it with the Migration Wizard. If the source extractor for your existing system doesn’t support this, you need to export the directory information and convert it to directory import format.
With the Directory Export command, you can export mailbox and custom recipient information. You can then convert this data into a format supported by your existing system’s directory import tools.
Importing Custom Recipients
If you need to import custom recipients from your existing system without using migration or directory synchronization tools, consider the following:
	How much information can be exported from the existing system? For example, are phone numbers, department names, and office locations on the existing system?
	What is the format of the display name in the existing system?
	How will foreign system recipients be imported to Microsoft Exchange Server?

Properties
The Microsoft Exchange Server directory can store information about custom recipients. If you use the custom recipient conversion feature of the Migration Wizard, the schema properties are preserved.
If you are going to import the custom recipients and the mailboxes to the same site and Recipients container, you can use the custom recipient conversion feature. If you populate these custom recipient fields, the information will be automatically imported to the mailboxes.
	Address	Admin-Description
	Admin-Display-Name	Alt-Recipient
	Assistant-Name	Auth-Orig
	AutoReply	AutoReply-Message
	AutoReply-Subject	Comment
	Common-Name	Company
	Department	Description
	DL-Mem-Reject-Perms	DL-Mem-Submit-Perms
	Display-Name	Display-Name-Printable
	Extension-Attribute-1	Extension-Attribute-2
	Extension-Attribute-3	Extension-Attribute-4
	Extension-Attribute-5	Extension-Attribute-6
	Extension-Attribute-7	Extension-Attribute-8
	Extension-Attribute-9	Extension-Attribute-10
	Given-Name	Initials
	International-ISDN-Number	Locality-Name
	Mail-nickname	Manager
	Member	Physical-Delivery-Office-Name
	Postal-Code	Proxy-Addresses
	Secondary-Proxy-Addresses	State-Or-Province-Name
	Surname	Telephone-Assistant
	Telephone-Fax	Telephone-Home
	Telephone-Home2	Telephone-Mobile
	Telephone-Number	Telephone-Office1
	Telephone-Office2	Telephone-Pager
	Teletex-Terminal-Identifier	Telex-Number
	Text-Country	Title
	Unauth-Orig

Display Names
If the two systems have different naming conventions, there could be name-sorting problems in the Address Book. You need to decide if the imported custom recipients’ display names will be modified to match your naming convention in Microsoft Exchange Server. For example, suppose that the existing system uses:
	<Last name>, <first name> 
But suppose that Microsoft Exchange Server is configured to display addresses as follows:
	<First name> <Last name> (<Department>)
In this case, it would be difficult for users to find names in the Address Book. Directory import won’t automatically create display names. The display name needs to be specified in the correct format in the import file.
Foreign Recipients 
If the existing system has directory entries for recipients in a foreign system, you should determine if those addresses will be imported to Microsoft Exchange Server. You should also determine if these addresses are already in the Microsoft Exchange Server directory from another system, such as through directory synchronization with MS Mail.
For example, your existing Lotus cc:Mail system has remote addresses for recipients on the Internet. You can ignore those addresses and import them as Lotus cc:Mail addresses (with appropriate gateway configurations), or import them as SMTP addresses for routing to the Internet Mail Connector.
Exporting Directory Information
The Directory Export command exports directory information from mailboxes, custom recipients, and public folders. You need to modify this information to fit your existing system’s import feature. Consider the following:
	Change Control
After you import all the addresses the first time, you might want to import changes later. The when-created and when-changed attributes can be exported for all recipients. By sorting the exported data on one of these two columns, you can find the new and modified items. Just importing new and modified recipients can reduce the work of later imports.
	Addresses
One of the address types should correspond to your existing system, depending on the gateway or connector. You’ll need to eliminate inappropriate addresses and export them. Your source system needs to understand the address format, so it may be necessary to modify the entry.
	Custom Recipients
Are there custom recipients in the Microsoft Exchange Server directory from other systems? If so, should they be exported to this system, or is there a directory exchange method? Also, what address should be used to export this recipient—the native address, the address that routes the mail to Microsoft Exchange Server (gateway passthrough), or the format appropriate to the existing system? 
For example, if there are IBM PROFS custom recipients in the directory, they can be exported to Lotus cc:Mail with PROFS, MS Mail, SMTP, or X.400 addresses, depending on how the mail would be routed from Lotus cc:Mail postoffices to the IBM PROFS host.
	Display Names
Is the display naming convention for the Microsoft Exchange Server directory the same as for the existing system? If not, will display names be modified?

Converting Network Accounts to Mailboxes
You can use source extractors and the Directory Import command to migrate existing users on NetWare, LAN Manager, and Windows NT networks. You should use a source extractor if you are creating mailboxes for many users who are not migrating from an existing mail system.
You can create Windows NT user accounts and mailboxes for existing NetWare®, LAN Manager, and Windows NT users. You first extract the information, then use the Directory Import command to import the user accounts to Microsoft Exchange Server. User accounts are created automatically when the mailboxes are imported. 
For more information about extracting NetWare, LAN Manager, and Windows NT user account information, see the Microsoft Exchange Server Administrator’s Guide.
Before you import a network account file, consider the following:
	Do the common names fit the organization’s naming convention?
If you have an established naming convention that you applied to the network accounts, the common names for the mailboxes should fit your naming convention. But if you will use a new naming convention, you need to use common names that don’t match the new naming convention. After you import this file, you will not be able to modify the common name field without deleting the mailbox.
	Is the Administrator program logged on to the correct server?
Unless you edited the file to specify the Microsoft Exchange Server computer, the mailboxes will be created on the server the Administrator program is logged on to. Of course, you can easily move mailboxes from one server to another in a site, especially when there is no mail to move.
	Have you configured a template user to supply some of the other directory information?

	To import a network account file
	1.	Select Directory Import from the Tools menu.
	2.	Specify the network account file to be imported.
	3.	Choose Import.

Removing Migrate Addresses
Most source extractors create “migrate addresses” to identify the source of mailboxes. For example, if you migrate the Network Manager mailbox of the MS Mail (AppleTalk) San Francisco Main server, the Microsoft Exchange Server mailbox will receive the following migrate address: migrate MSA:Network Manager@San Francisco Main. The Migration Wizard will import items from the MS Mail (AppleTalk) mailbox to the new mailbox.
	To remove migrate addresses
	1.	After migration is complete, use the Directory Export command to export all mailboxes to a text file with this header:
Obj-class,mode,common-name,secondary-proxy-addresses

	2.	Make a backup of the exported file. The backup can restore the directory to its previous state if there is an import problem.
	3.	Edit the file to set the second column (mode) to modify for all mailboxes.
	4.	Edit the third column (secondary-proxy-addresses) to remove the migrate addresses, but leave the other addresses intact.
	5.	Import the modified file, selecting the Overwrite options for multivalued properties. 
	
The e-mail addresses in the modified file replace all the addresses in the mailboxes. 

BLANK PAGE
IMPORTANT: This text will appear on screen, but will not print on a PostScript printer.
This page should be the last one in this file; it was inserted by running the InsertBlankPage macro.
Do not type any additional text on this page!