how to search additional email address
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
how to search additional email address

 
Post new topic   Reply to topic    Windows Server Forum Index -> Active Directory
Author Message
Henry Yan
Guest





Posted: Tue Jan 11, 2005 9:57 am    Post subject: how to search additional email address Reply with quote

Hi
In a user account, he got couple email addresses, for example, his primary
email address is john@abc.com, he also has another email address for
example, info@abc.com. now my question is, how to find out this info@abc.com
belong to which user?
I search the AD by using email as the criteria, if I use john@abc.com, I can
find out who is the user. but if I use info@abc.com, then I got nothing,
could some one tell me how to do a search by this additional email address
(info@abc.com)?

Many thanks

Henry
Back to top
ptwilliams
Guest





Posted: Tue Jan 11, 2005 1:56 pm    Post subject: Re: how to search additional email address Reply with quote

I assume we're talking about the Exchange addresses?

If this is the case you either need to search using the proxyAddresses
attribute, or you can use ANR (ANR includes the proxyAddresses attribute as
part of it's search-base).

What do you want to do? If you're looking for users with these addresses so
that you can remove them, you can use LDP to get the query right and then
use LDIFDE to pull the actual data that you want. Alternatively, a cleaner
way (and the way I've been doing it recently) is to use the LDAP query in a
script, and just write the DN and the proxyAddresses attribute to a text
file -much cleaner and easier to read. You can then use LDIFDE (or the
script) to make the necessary changes.

The script here, can easily be tweaked to match your needs. You just need
to write out to a file. I always write to the file in LDIF format.
-- http://www.rlmueller.net/ADOSearchTips.htm


I'm not very familiar with the advanced search of ADU&C because I always
resort to LDP. I imagine you can search for this attribute using the ADU&C
advanced search too.

--

Paul Williams

http://www.msresource.net/
http://forums.msresource.net/

"Henry Yan" <huan_y@hotmail.com> wrote in message
news:e9%23LlG59EHA.2032@tk2msftngp13.phx.gbl...
Hi
In a user account, he got couple email addresses, for example, his primary
email address is john@abc.com, he also has another email address for
example, info@abc.com. now my question is, how to find out this info@abc.com
belong to which user?
I search the AD by using email as the criteria, if I use john@abc.com, I can
find out who is the user. but if I use info@abc.com, then I got nothing,
could some one tell me how to do a search by this additional email address
(info@abc.com)?

Many thanks

Henry
Back to top
Joe Richards [MVP]
Guest





Posted: Tue Jan 11, 2005 9:24 pm    Post subject: Re: how to search additional email address Reply with quote

One thing to keep in mind with an ANR search is that it builds a filter that
most people don't understand and especially with proxyaddresses probably won't
find what is expected. For instance if searching for info@abc.com your resultant
filter will look something like

(|
(displayName=info@abc.com*)
(mail=info@abc.com*)
(givenName=info@abc.com*)
(legacyExchangeDN=info@abc.com)
(msDS-AdditionalSamAccountName=info@abc.com*)
(mailNickname=info@abc.com*)
(physicalDeliveryOfficeName=info@abc.com*)
(proxyAddresses=info@abc.com*)
(name=info@abc.com*)
(sAMAccountName=info@abc.com*)
(sn=info@abc.com*)
)

You will note that proxyaddresses is in there but the format of the attribute
they are searching for is info@abc.com* which won't ever hit any proxyaddress
because proxyaddresses are made up of a label for the address type couple with
the address such as

smtp:info@abc.com


You could force it to be found by doing anr=smtp:info@abc.com but that would
result in a pretty poor filter due to the wildcard being at the front of the
query strings. That will only be performant on a system where those attributes
have tuple indexes which isn't very common.


With Exchange both the primary and any secondary email addresses should all be
contained in proxyAddresses so someone should be able to find ANY Exchange
related mail address (be it Exchange mail enabled such as a contact/user/group
or Exchange mailbox enabled) and what object it is tied to with a search such as

proxyaddresses=smtp:address@domain.

So for this case:

proxyaddresses=smtp:info@abc.com

note that case of smtp is irrelevant to AD. The attribute is a case-insensitive
unicode string though to Exchange the case means something. Lowercase label is a
secondary address, uppercase label is a primary address. So again for the
example provided, you should see at least two proxyaddresses for smtp

SMTP:john@abc.com
smtp:info@abc.com


Note that because AD doesn't care about the case, there is no difference in
searching for SMTP:john@abc.com versus smtp:john@abc.com so you can't use a
search directly to ascertain whether an address is primary or secondary. You
still have to look at the result set or choose another attribute such as mail or
targetaddress or whatever depending on the address type and the whether mail
enabled or mailbox enabled.

joe



--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


ptwilliams wrote:
Quote:
I assume we're talking about the Exchange addresses?

If this is the case you either need to search using the proxyAddresses
attribute, or you can use ANR (ANR includes the proxyAddresses attribute as
part of it's search-base).

What do you want to do? If you're looking for users with these addresses so
that you can remove them, you can use LDP to get the query right and then
use LDIFDE to pull the actual data that you want. Alternatively, a cleaner
way (and the way I've been doing it recently) is to use the LDAP query in a
script, and just write the DN and the proxyAddresses attribute to a text
file -much cleaner and easier to read. You can then use LDIFDE (or the
script) to make the necessary changes.

The script here, can easily be tweaked to match your needs. You just need
to write out to a file. I always write to the file in LDIF format.
-- http://www.rlmueller.net/ADOSearchTips.htm


I'm not very familiar with the advanced search of ADU&C because I always
resort to LDP. I imagine you can search for this attribute using the ADU&C
advanced search too.
Back to top
Henry
Guest





Posted: Wed Jan 12, 2005 5:07 am    Post subject: Re: how to search additional email address Reply with quote

many thanks to Paul and Joe,is there any article I can know more about LDAP
query for MS AD?

br

Henry
"Henry Yan" <huan_y@hotmail.com> 写入消息新闻:e9%23LlG59EHA.2032@tk2msftngp13.phx.gbl...
Quote:
Hi
In a user account, he got couple email addresses, for example, his primary
email address is john@abc.com, he also has another email address for
example, info@abc.com. now my question is, how to find out this
info@abc.com belong to which user?
I search the AD by using email as the criteria, if I use john@abc.com, I
can find out who is the user. but if I use info@abc.com, then I got
nothing, could some one tell me how to do a search by this additional
email address (info@abc.com)?

Many thanks

Henry
Back to top
Joe Richards [MVP]
Guest





Posted: Wed Jan 12, 2005 9:04 am    Post subject: Re: how to search additional email address Reply with quote

It is all pretty much spread around the MSDN library.

joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


Henry wrote:
Quote:
many thanks to Paul and Joe,is there any article I can know more about LDAP
query for MS AD?

br

Henry
"Henry Yan" <huan_y@hotmail.com> 写入消息新闻:e9%23LlG59EHA.2032@tk2msftngp13.phx.gbl...

Hi
In a user account, he got couple email addresses, for example, his primary
email address is john@abc.com, he also has another email address for
example, info@abc.com. now my question is, how to find out this
info@abc.com belong to which user?
I search the AD by using email as the criteria, if I use john@abc.com, I
can find out who is the user. but if I use info@abc.com, then I got
nothing, could some one tell me how to do a search by this additional
email address (info@abc.com)?

Many thanks

Henry



Back to top
ptwilliams
Guest





Posted: Thu Jan 13, 2005 3:10 am    Post subject: Re: how to search additional email address Reply with quote

Yes, the MSDN site is a great resource for this. There's also a very good
introduction the Windows 2000 Server Resource Kit - Distributed Systems
Guide.

Here's the free, online version:
--
http://www.microsoft.com/resources/documentation/windows/2000/server/reskit/en-us/default.asp

--

Paul Williams

http://www.msresource.net/
http://forums.msresource.net/

"Joe Richards [MVP]" <humorexpress@hotmail.com> wrote in message
news:ujjaDOF%23EHA.2156@TK2MSFTNGP10.phx.gbl...
It is all pretty much spread around the MSDN library.

joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


Henry wrote:
Quote:
many thanks to Paul and Joe,is there any article I can know more about
LDAP
query for MS AD?

br

Henry
"Henry Yan" <huan_y@hotmail.com
写入消息新闻:e9%23LlG59EHA.2032@tk2msftngp13.phx.gbl...

Hi
In a user account, he got couple email addresses, for example, his primary
email address is john@abc.com, he also has another email address for
example, info@abc.com. now my question is, how to find out this
info@abc.com belong to which user?
I search the AD by using email as the criteria, if I use john@abc.com, I
can find out who is the user. but if I use info@abc.com, then I got
nothing, could some one tell me how to do a search by this additional
email address (info@abc.com)?

Many thanks

Henry



Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Active Directory All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB