Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Fri, 7 Oct 2005 06:29:01 -0700,    group: microsoft.public.exchange2000.development        back       


Determine NT User from E-mail address   
Hi, I'm using SMTP transport events with Exchange server and I have the 
following problem : given an e-mail address I need to determine if the owner 
is a user or distribution  group inside the organization. 

So , if I have the address : jdoe@company.com , to find out that that this 
coresponds to user John Doe . Of course if the address is jdoe@yahoo.com it 
wont find a valid user.

One solution would be to search the AD tree for all the e-mail addresses but 
I believe there should be a easier way of doing it.

Thanks in advance,
Mihai.
date: Fri, 7 Oct 2005 06:29:01 -0700   author:   Mihai M

Re: Determine NT User from E-mail address   
The information is in AD.  Depending on how you have it stored, you have 
several options for translating the SMTP to the username.  I can't tell from 
the question though if you're just trying to differentiate users from 
groups.

For a user if the SMTP is the same as the UPN, then you can use the 
iADsNameTranslate function.

If not, then you're left to do a search for the SMTP that returns the 
objectClass.

On a heavily used system, you may run into performance issues doing this 
many lookups.  As an alternative you could periodically export the objects 
and properties you care about into a text file and do the lookup from there.


"Mihai M"  wrote in message 
news:1371C886-3A19-4AAF-8783-2CF296FF14F3@microsoft.com...
> Hi, I'm using SMTP transport events with Exchange server and I have the
> following problem : given an e-mail address I need to determine if the 
> owner
> is a user or distribution  group inside the organization.
>
> So , if I have the address : jdoe@company.com , to find out that that this
> coresponds to user John Doe . Of course if the address is jdoe@yahoo.com 
> it
> wont find a valid user.
>
> One solution would be to search the AD tree for all the e-mail addresses 
> but
> I believe there should be a easier way of doing it.
>
> Thanks in advance,
> Mihai.
date: Sun, 9 Oct 2005 01:03:58 -0500   author:   andy webb

Re: Determine NT User from E-mail address   
Hi Andy,
Thx. for the time you took to answer. 
The problem is that there could be several e-mail addresses associated with 
an user or group and I need to determine the user or group based on that 
address. And I can not assume that the SMTP name is the same as UPN. 
I was thinking to do a search on the user and group classes and get all the 
e-mail addresses stored in proxyAddresses attribute (this is where I believe 
exchange stores all the addresses). Then I'll use this data a cached lookup 
table.
Like I've mentioned before - my problem is : given an e-mail - return the 
user (or group) that owns that address (if any).
Mihai.

"andy webb" wrote:

> The information is in AD.  Depending on how you have it stored, you have 
> several options for translating the SMTP to the username.  I can't tell from 
> the question though if you're just trying to differentiate users from 
> groups.
> 
> For a user if the SMTP is the same as the UPN, then you can use the 
> iADsNameTranslate function.
> 
> If not, then you're left to do a search for the SMTP that returns the 
> objectClass.
> 
> On a heavily used system, you may run into performance issues doing this 
> many lookups.  As an alternative you could periodically export the objects 
> and properties you care about into a text file and do the lookup from there.
> 
> 
> "Mihai M"  wrote in message 
> news:1371C886-3A19-4AAF-8783-2CF296FF14F3@microsoft.com...
> > Hi, I'm using SMTP transport events with Exchange server and I have the
> > following problem : given an e-mail address I need to determine if the 
> > owner
> > is a user or distribution  group inside the organization.
> >
> > So , if I have the address : jdoe@company.com , to find out that that this
> > coresponds to user John Doe . Of course if the address is jdoe@yahoo.com 
> > it
> > wont find a valid user.
> >
> > One solution would be to search the AD tree for all the e-mail addresses 
> > but
> > I believe there should be a easier way of doing it.
> >
> > Thanks in advance,
> > Mihai. 
> 
> 
>
date: Mon, 10 Oct 2005 02:24:02 -0700   author:   Mihai M

Re: Determine NT User from E-mail address   
If you just do a search (use ldifde to test) with a restriction of 
"proxyAddresses = smtp:foo@bar.com" and a prop list of "dn" then you should 
get your result regardless of whether it's primary or secondary or group or 
user.


"Mihai M"  wrote in message 
news:C4AC211D-6CD3-4853-80C6-6117D2F82AF4@microsoft.com...
> Hi Andy,
> Thx. for the time you took to answer.
> The problem is that there could be several e-mail addresses associated 
> with
> an user or group and I need to determine the user or group based on that
> address. And I can not assume that the SMTP name is the same as UPN.
> I was thinking to do a search on the user and group classes and get all 
> the
> e-mail addresses stored in proxyAddresses attribute (this is where I 
> believe
> exchange stores all the addresses). Then I'll use this data a cached 
> lookup
> table.
> Like I've mentioned before - my problem is : given an e-mail - return the
> user (or group) that owns that address (if any).
> Mihai.
>
> "andy webb" wrote:
>
>> The information is in AD.  Depending on how you have it stored, you have
>> several options for translating the SMTP to the username.  I can't tell 
>> from
>> the question though if you're just trying to differentiate users from
>> groups.
>>
>> For a user if the SMTP is the same as the UPN, then you can use the
>> iADsNameTranslate function.
>>
>> If not, then you're left to do a search for the SMTP that returns the
>> objectClass.
>>
>> On a heavily used system, you may run into performance issues doing this
>> many lookups.  As an alternative you could periodically export the 
>> objects
>> and properties you care about into a text file and do the lookup from 
>> there.
>>
>>
>> "Mihai M"  wrote in message
>> news:1371C886-3A19-4AAF-8783-2CF296FF14F3@microsoft.com...
>> > Hi, I'm using SMTP transport events with Exchange server and I have the
>> > following problem : given an e-mail address I need to determine if the
>> > owner
>> > is a user or distribution  group inside the organization.
>> >
>> > So , if I have the address : jdoe@company.com , to find out that that 
>> > this
>> > coresponds to user John Doe . Of course if the address is 
>> > jdoe@yahoo.com
>> > it
>> > wont find a valid user.
>> >
>> > One solution would be to search the AD tree for all the e-mail 
>> > addresses
>> > but
>> > I believe there should be a easier way of doing it.
>> >
>> > Thanks in advance,
>> > Mihai.
>>
>>
>>
date: Mon, 10 Oct 2005 21:53:12 -0500   author:   andy webb

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us