Using CSVDE/LDIFDE to find an email address:
csvde -f outputfilename.csv -d "dc=domain,dc=com" -r "(&(mailnickname=*)(proxyAddresses=smtp:UserName@domain.com))" -l name
Replace "dc=domain,dc=com" with your AD domain name and suffix, and UserName@domain.com with the exact email address you’re looking for.
To find all recipients who have an email address from a particular SMTP domain, you can use a wildcard, e.g.:
csvde -f outputfilename.csv -d "dc=domain,dc=com" -r "(&(mailnickname=*)(proxyAddresses=smtp:*@domain.com))" -l name
In the above example, only the name field is exported. All CSVDE/LDIFDE queries also return the object’s distinguishedName. To add more fields to the list, insert a coma after name and type new field names separated by a coma: e.g.
name,displayName,sAMAccountName,proxyAddresses,homeMDB
Finding email addresses using the Exchange shell (Exchange Server 2007): The Exchange Server 2007 shell makes it easier (once you familiarize yourself with shell basics). To get a list of all recipients with email addresses from a particular domain:
get-recipient | where {$_.emailaddresses -match "domain.com"} | select name,emailaddresses
To get a list of recipients with a particular email address:
get-recipient | where {$_.emailaddresses -match "UserName@domain.com"} | select name,emailaddresses