You can use the Ldifde.exe utility that is included in Windows 2000 to export and import Active Directory information as plain text in the LDIF format. Ldifde uses the same standard LDAP search syntax as the Exchange recipient policy filters. You can paste a recipient policy filter into an Ldifde command line and create a text file that lists every object in a container that is captured by the filter. The following command is an example of the general syntax to create a text file:
ldifde -f file.txt -d "dc=subdomain,dc=domain,dc=com" -l [attribute list] -r "[ldap filter]"
In this command, all objects in Subdomain that fit the filter are written to File.txt. To capture objects from the Configuration container, you must specify the container and the first domain that is installed in the forest, for example:
ldifde -f file.txt -d "cn=configuration,dc=firstdomain,dc=com" -l [attribute list] -r "[ldap filter]"
The -l parameter restricts the attributes for the object that are written to File.txt. If you omit -l, all attributes for each object are listed. To list none of the attributes, use -l nothing. If you do so, the command exports only the distinguished name of each object to File.txt.
To find all duplicate or multiple proxy addresses, you can run Ldifde against every domain in your organization and against the Configuration container for your forest. To do so, you must define a unique search pattern that matches only the unwanted addresses.
For this example, the search pattern is *SMTP:_*@*. This search pattern captures every SMTP (Internet Mail) Exchange e-mail proxy address that starts with an underscore. For example, run the following command:
ldifde -f badproxies.txt -d "dc=domain,dc=com" -l proxyaddresses -r "(proxyaddresses=*smtp:_*@*)"