none
How can I get the server name that contains a specific mailbox? RRS feed

  • Question

  • Hi,

     

    After I perform RopLogon, I want to know the server name that hosts the mailbox.

    I've tried getting the PidTagStoreEntryId property (which contains ServerShortName), but RopGetPropertiesSpecific always return MAPI_E_NOT_FOUND for all the objects I've tried, including the store object handle, the root folder and the inbox folder (and also on some messages). 

    Additionally, I get the same error when I try to retrieve the PidEntryId on the store handle.

    Please note that I successfully retrieve all other properties in the same request.

     

    How can I get that server name?

     

    Thanks in advance,

     

    Ortal.

     

     

     

    • Edited by OrtalR Wednesday, January 12, 2011 4:18 PM
    Wednesday, January 12, 2011 3:05 PM

Answers

  • Hi Ortal,

    Thanks for your patience.  Here is an explanation from our Exchange team (paraphrased):

    A point clarification, this and the previous answer are based on Exchange 2010. If you are only interested in 2007 and earlier, then that is a different story.

    So in Exchange 2010, work was done to make failovers/moves to be as transparent to clients as possible. So if a mailbox was moved to another database or if a database was failed over to another server, the client shouldn’t see any differences when reconnecting.

    So neither the mailbox or the replica GUIDs that comes back in the RopLogon response will help in identifying the database or the server that is hosting the active copy of the mailbox, because they will remain the same no matter where the mailbox is.

    There are probably ways to figure this out outside of ROPs (like via AD perhaps), but that is outside the scope of this forum.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Friday, January 28, 2011 4:31 PM

All replies

  • Hi Shira, thank you for your question. A member of the protocol documentation team will respond to you soon.
    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Wednesday, January 12, 2011 3:36 PM
    Moderator
  • Hi Ortal,

    I've been assigned to help you.  I will investigate and get back to you shortly.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Wednesday, January 12, 2011 8:31 PM
  • Ortal,

    Are you trying to get the hostname or will a store GUID do?

    Brad

     

    Wednesday, January 12, 2011 8:37 PM
  • Hi Guys,

    Thank you for a prompt response.

     

    Basically I need both server name and store GUID. In any case I need to display the server name.

     

    Thanks again,

    Ortal

    • Edited by OrtalR Wednesday, January 12, 2011 11:08 PM line breaks
    Wednesday, January 12, 2011 11:06 PM
  • Well, you can get the mailbox store GUID for a particular as the ReplGuid  (bytes 7C -> 8B) in RopLogon.

    I'm not sure you can reliably turn that into a hostname though. I don't see anything in the Exchange RPC protocol that even requires the backend store ops to be performed using the same host from one call to the next. The front end (Client Access Server in Exchange terms) should be the same (and presumably you can just look that up by DNS from the IP address you're using), but that doesn't appear to be what you're asking.

    Perhaps this might be easier if you can tell us what you're trying to achieve?

    Brad

    Wednesday, January 12, 2011 11:52 PM
  • Hi Brad,

     

    Yes, you are right that using DNS lookup will not get me the name of the mailbox store server which I seek.

    Basically I am trying to extend an existing diagnostics tool to support exchange CAS and MBX servers.
    Part of it's operation is to connect to different accounts to verify that the MBX is in a good shape.
    The parts that collect the information and displays alarms and statistics already exists and use host names.

    I guess it's possible to resolve the store GUIDs using active directory, but it's not something I would prefer to do, for obvious reasons.

    Regarding your reply:

    1) Store entry IDs have a short server field, isn't it a requirement to the backend?

    2) I still don't understand why Exchange refuse to return the value of PidTagStoreEntryId. Outlook spy shows this property for all objects. How?

    3) I still don't understand why Exchange refuse to return the value of PidTagEntryId of the store object? (Outlook spy shows this value as well)

    3) After a successful logon operation, shouldn't all subsequent operations with the same LogonId be handled by the same replica, using the same replica ID?
    If not, how does it effect the FIDs and MIDs, which contain the replica ID?

    4) Just to clarify - the response buffer of RopLogon contain the MailboxGuid - which refers to the actual mailbox (of a single user) in all of the replicas and the ReplGuid - which refers to the relevant mailbox store?

     

    Thanks,

     

    Ortal

     

     


    Thursday, January 13, 2011 12:32 AM
  • Hi,

     

    I've done some checking, it seems the ReplGuid field in the RopLogon response is not the GUID of the mailbox store itself.

    Additionally, I could not find such a guid in the active directory.

     

    So basically I am back to square one in this issue.

     

     

    Ortal

    Thursday, January 13, 2011 10:38 AM
  • Hi,

     

    I am still waiting for a response. Is anyone looking into this?

     

    Thanks,

     

    Ortal

    Monday, January 17, 2011 4:02 PM
  • I'm not - busy.

    I think it is unrealistic to expect the Microsoft guys to get you an answer in only a few days plus a weekend though. They have to do the research, get it checked, and post it. If you want to know how long it usually takes, look at all the other queries.

    Brad

     

    Monday, January 17, 2011 7:49 PM
  • Hi Brad,

     

    Considering the initial replies were quick I got my hopes up.

    Looking at the forum it seems it does take some time.

     

    I'll be patient then :)

     

    Ortal

     

     

    Monday, January 17, 2011 8:17 PM
  • Ortal,

    Regarding the first three questions above:

    1) Store entry IDs have a short server field, isn't it a requirement to the backend?

    2) I still don't understand why Exchange refuse to return the value of PidTagStoreEntryId. Outlook spy shows this property for all objects. How?

    3) I still don't understand why Exchange refuse to return the value of PidTagEntryId of the store object? (Outlook spy shows this value as well)

    I would recommend using the November release of MFCMAPI to verify that these properties are indeed returned.  You can then review the source to see how MFCMAPI does it.  The code and executables are available on http://mfcmapi.codeplex.com/

    Alternatively, if you'd like to send your code relevant to retrieving these properties to me, I'd be glad to take a look.  Just post a request to dochelp @ Microsoft.com, reference my name and the URL for this forum thread.  I will respond and you can send me your code excerpt.

    For the store GUID, is it the Provider GUID referenced in MS-OXCDATA 2.2.3 that you're interested in? 

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Tuesday, January 18, 2011 1:54 AM
  • Hi Ortal,

    I must take back what I said before about MFCMAPI.  Some of the properties available via the MAPI calls are not available over the wire protocol.  The two in question here are in that category. 

    -        The server name in the StoreEntryId is created by the client based on the server it is connected to.

    -        For private mailboxes in Ex2010 and later, the “server it is connected to” is the CAS server, not the MBX server.

    -        PIdTagEntryId is also generated on the client. 

    -        There is no way via ROPS to get the name of the MBX server that a mailbox is hosted on.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Tuesday, January 18, 2011 8:43 PM
  • Hi Tom,

     

    Thank you for the detailed answer.

    Just to be clear, the last point:

    "There is no way via ROPS to get the name of the MBX server that a mailbox is hosted on."

    Does it mean that there is no way to identify the mailbox store DB that a mailbox is hosted on via the EMSMDB interface?

    By "identify" I refer to the mailbox store DB GUID, or any other way to distinguish one MBX server from another - like decoding replica GUIDs or something.

     

    If it is possible, than how? :)

     

    Best regards,

     

    Ortal

     

    Tuesday, January 18, 2011 10:32 PM
  • Hey Ortal,

    Thanks for the followup question, I'll get back to you shortly.

    Tom

    Wednesday, January 19, 2011 2:00 PM
  • Hi Ortal,

    Thanks for your patience.  Here is an explanation from our Exchange team (paraphrased):

    A point clarification, this and the previous answer are based on Exchange 2010. If you are only interested in 2007 and earlier, then that is a different story.

    So in Exchange 2010, work was done to make failovers/moves to be as transparent to clients as possible. So if a mailbox was moved to another database or if a database was failed over to another server, the client shouldn’t see any differences when reconnecting.

    So neither the mailbox or the replica GUIDs that comes back in the RopLogon response will help in identifying the database or the server that is hosting the active copy of the mailbox, because they will remain the same no matter where the mailbox is.

    There are probably ways to figure this out outside of ROPs (like via AD perhaps), but that is outside the scope of this forum.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Friday, January 28, 2011 4:31 PM
  • Hi Tom,

     

    Thanks for the help!

     

    Ortal

    Sunday, February 13, 2011 9:05 AM