exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Identify owner of mailbox in exchange event sink

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development
Author Message
Sergey Galtsev



Joined: 28 Sep 2007
Posts: 1

PostPosted: Thu Sep 06, 2007 3:58 pm    Post subject: Identify owner of mailbox in exchange event sink Reply with quote

I'm writing an exchange event sink application which monitors for mailbox
events and one of items I'm looking to do is to identify if mailbox access is
done by primary owner or another person. Basically, what I'm trying to do is
to obtain information during event execution which will allow me to locate
the SID of mailbox owner. I'm a little bit confused what can be done to make
this happen. I was trying following approaches:

- use the mailbox alias part of
"file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work, because
this alias is being fixed after mailbox is created and will not change if AD
user changes his alias, hence it's not possible to rely on this data

- use ntsecuritydescriptor to determine owner. Didn't work, because owner is
always shown as DOMAIN\Administrators group.

- Determine mailbox GUID and locate user in AD which is tied to this GUID.
Didn't work because I couldn't find any way to locate mailbox GUID using
EXOLEDB. I also tried to use MAPI properties to locate this GUID and couldn't
find a property which would give me that.

Any suggestions?

Archived from group: microsoft>public>exchange2000>development
Back to top
View user's profile Send private message
Sergey Galtsev



Joined: 28 Sep 2007
Posts: 2

PostPosted: Thu Sep 06, 2007 6:32 pm    Post subject: RE: Identify owner of mailbox in exchange event sink Reply with quote

Update: I also tried to use IExchangeManageStore->GetMailboxTable() method as
a way to link mailbox alias to a legacyExchangeDN
(/O=organization/OU=AdmGroup/CN=Configuration.../CN=mailbox). Didn't work: I
could obtain legacyExchangeDn in PR_EMAIL_ADDRESS field, but there's no
information which will alow me to link this to EXOLEDB URL.


"Sergey Galtsev" wrote:

> I'm writing an exchange event sink application which monitors for mailbox
> events and one of items I'm looking to do is to identify if mailbox access is
> done by primary owner or another person. Basically, what I'm trying to do is
> to obtain information during event execution which will allow me to locate
> the SID of mailbox owner. I'm a little bit confused what can be done to make
> this happen. I was trying following approaches:
>
> - use the mailbox alias part of
> "file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work, because
> this alias is being fixed after mailbox is created and will not change if AD
> user changes his alias, hence it's not possible to rely on this data
>
> - use ntsecuritydescriptor to determine owner. Didn't work, because owner is
> always shown as DOMAIN\Administrators group.
>
> - Determine mailbox GUID and locate user in AD which is tied to this GUID.
> Didn't work because I couldn't find any way to locate mailbox GUID using
> EXOLEDB. I also tried to use MAPI properties to locate this GUID and couldn't
> find a property which would give me that.
>
> Any suggestions?
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Thu Sep 13, 2007 3:19 am    Post subject: Re: Identify owner of mailbox in exchange event sink Reply with quote

Hello,

if you have the legacyExchangeDN, you can use this to perform a search in
the Active Directory. This will return the user with the specified
legacyExchangeDN.

Kind regards,
Henning

"Sergey Galtsev" wrote in message @microsoft.com...
> Update: I also tried to use IExchangeManageStore->GetMailboxTable() method
> as
> a way to link mailbox alias to a legacyExchangeDN
> (/O=organization/OU=AdmGroup/CN=Configuration.../CN=mailbox). Didn't work:
> I
> could obtain legacyExchangeDn in PR_EMAIL_ADDRESS field, but there's no
> information which will alow me to link this to EXOLEDB URL.
>
>
> "Sergey Galtsev" wrote:
>
>> I'm writing an exchange event sink application which monitors for mailbox
>> events and one of items I'm looking to do is to identify if mailbox
>> access is
>> done by primary owner or another person. Basically, what I'm trying to do
>> is
>> to obtain information during event execution which will allow me to
>> locate
>> the SID of mailbox owner. I'm a little bit confused what can be done to
>> make
>> this happen. I was trying following approaches:
>>
>> - use the mailbox alias part of
>> "file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work,
>> because
>> this alias is being fixed after mailbox is created and will not change if
>> AD
>> user changes his alias, hence it's not possible to rely on this data
>>
>> - use ntsecuritydescriptor to determine owner. Didn't work, because owner
>> is
>> always shown as DOMAIN\Administrators group.
>>
>> - Determine mailbox GUID and locate user in AD which is tied to this
>> GUID.
>> Didn't work because I couldn't find any way to locate mailbox GUID using
>> EXOLEDB. I also tried to use MAPI properties to locate this GUID and
>> couldn't
>> find a property which would give me that.
>>
>> Any suggestions?

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Exchange event sink I'm looking to make an event sink that will forward specific emails (by what's in the subject line) but without the original attachment. This sink would only apply to one user. I'm new at developing. If anyone could point me in the right direction, I'd

cannot get event sink to work! pls. help Hi all, I'm trying to write an event sink that sends an email each time an email is received by anybody. the script is like this: