Thanks Ben, I got it working, my mistake was that the "preview this query" lists everything returned, but it seems the box processes the final list and only reads the SMTP: addresses.
Thanks, Paul -----Original Message----- From: Ben Scott [mailto:mailvor...@gmail.com] Sent: 19 August 2010 14:30 To: MS-Exchange Admin Issues Subject: Re: LDAP Query? On Thu, Aug 19, 2010 at 9:00 AM, Paul Hutchings <paul.hutchi...@mira.co.uk> wrote: > Mail returns only the primary email address and Proxyaddresses returns all > the email addresses and types (so X400 as well). I have a Perl script I use to export email addresses from AD on our *nix mail gateway. It looks at proxyAddresses and then does a text match to filter anything that doesn't begin with "smtp:". This leads me to suspect that the type of email address is not stored as a separate Active Directory attribute, but rather is just a part of the attribute data. If so, you won't be able to use just an LDAP query to filter the results. -- Ben -- MIRA Ltd Watling Street, Nuneaton, Warwickshire, CV10 0TU, England. Registered in England and Wales No. 402570 VAT Registration GB 114 5409 96 The contents of this e-mail are confidential and are solely for the use of the intended recipient. If you receive this e-mail in error, please delete it and notify us either by e-mail, telephone or fax. You should not copy, forward or otherwise disclose the content of the e-mail as this is prohibited.