I'm trying to gather a list of all e-mail addresses being used by our Exchange 2003 system, which includes not only the normal user addresses, but distribution groups and aliases as well. I also need the output formatted like: [email protected] - although, we only have one domain, so even if I can get the user part, that would work.
I don't care about account-association here, I really just need a list of addresses.
How can I go about doing an export of all smtp e-mail addresses from Exchange 2003, including distribution group and alias addresses in the [email protected] format?
I would prefer something that can be accomplished via the command line so that it can be generated by a script, but it would be just as useful if there is a way to do this manually (read: point and click) as well.
Any ideas? I don't see anything within System Manager that can do this, and my searching isn't turning up anything that can fulfill all the above requirements.
Solved
This is how I'm using the accepted answer:
@echo off
ldifde -f c:\temp\ldifde-dump.txt -l proxyaddresses
find "@" < c:\temp\ldifde-dump.txt > c:\temp\email-addresses.txt
del c:\temp\ldifde-dump.txt
This produces c:\temp\email-addresses.txt, which, although it contains a little extra garbage characters, it can easily be parsed out with a search & replace in Notepad++.
If you only need primary email addresses, you can run this on your Exchange server, filling in the domain and com values:
To get secondary email addresses, its a bit trickier. You can use this to generate a file:
Found a method to extract the email addresses from the LDF file here: http://bytes.com/topic/unix/answers/648158-extract-email-addresses-big-file
If you have access to perl within Windows, make a perl file that contains this:
Then run this command:
Out.txt should contain all your email addresses.
Adfind.exe with this: AdFind.exe -default -nodn -nolabel -noctl proxyAddressess
Chop out all of the SMTP: or smtp: addresses.
http://www.joeware.net/freetools/tools/adfind/index.htm