none
What does Message ID in multi-mailbox search log mean? RRS feed

  • Question

  • After using multi-mailbox search and enabled full log, I can find a log file in my discovery mailbox.

    There is a column, "Message ID", in this log file. I don't know what's this property mean.

    I got ID of this message in discovery mailbox by EWS ( msg.Id ), it's not equal to the value in log.

    And I also got ID of original message, which is in end user's mailbox,  it's not equal to the value in log too.

    I'm wondering which message property does this "Message ID" in log file related with. 

    Thanks.

      

    Wednesday, July 11, 2012 6:51 AM

Answers

  • The Message ID is the Internet MessageID (or pidTagInternetMesssageId http://msdn.microsoft.com/en-us/library/cc839521.aspx) this it the RFC MessageID assigned by the MTA. You can't use this ID to bind directly to a message but you can search for a message using this id (as long as you know the folder where the mail is located) eg

          ItemView ivew = new ItemView(3);
          service.TraceEnabled = true;
          ExtendedPropertyDefinition PidTagInternetMessageId = new ExtendedPropertyDefinition(4149, MapiPropertyType.String);
          SearchFilter sf = new SearchFilter.IsEqualTo(PidTagInternetMessageId, MessageID);
          FindItemsResults<Item> iCol = service.FindItems(WellKnownFolderName.Inbox, sf, ivew);
    
          foreach (Item item in iCol.Items)
          {
            Console.WriteLine(item.Subject);
          }
    
    Cheers
    Glen
    • Marked as answer by Carly Gui Wednesday, August 1, 2012 5:13 AM
    Thursday, July 12, 2012 6:48 AM

All replies

  • The Message ID is the Internet MessageID (or pidTagInternetMesssageId http://msdn.microsoft.com/en-us/library/cc839521.aspx) this it the RFC MessageID assigned by the MTA. You can't use this ID to bind directly to a message but you can search for a message using this id (as long as you know the folder where the mail is located) eg

          ItemView ivew = new ItemView(3);
          service.TraceEnabled = true;
          ExtendedPropertyDefinition PidTagInternetMessageId = new ExtendedPropertyDefinition(4149, MapiPropertyType.String);
          SearchFilter sf = new SearchFilter.IsEqualTo(PidTagInternetMessageId, MessageID);
          FindItemsResults<Item> iCol = service.FindItems(WellKnownFolderName.Inbox, sf, ivew);
    
          foreach (Item item in iCol.Items)
          {
            Console.WriteLine(item.Subject);
          }
    
    Cheers
    Glen
    • Marked as answer by Carly Gui Wednesday, August 1, 2012 5:13 AM
    Thursday, July 12, 2012 6:48 AM
  • Hi Glen,

    In my log file, Message ID is:

    RgAAAACNs8UUmUdnSJRc/pW97QEaBwC++/ZCKZACTJ6G3Y7UVvaQAAAAJDnUAAC++/ZCKZACTJ6G3Y7UVvaQAAAAMZnTAAAJ

    But  pidTagInternetMesssageId is :

    <BEFBF6422990024C9E86DD8ED456F690318153@WIN-IIAOR3V1V05.ex2008.com>

    is there a encoding? Base64?

    Thank you.

    Carly

    Friday, July 13, 2012 2:23 AM
  • That's the OWAid you have then (anything prefixed with Rg is an OWAid) you can convert this to a EWSid or Outlook HexEntry which would then let you bind to the Item eg http://msdn.microsoft.com/en-us/library/gg274397(v=exchg.80).aspx. or http://msdn.microsoft.com/en-us/library/bb856559(v=EXCHG.140).aspx

    Cheers
    Glen

    Friday, July 13, 2012 4:23 AM
  • Hi Glen,

    Thank you for your reply. 

    Your solution resolved my problem:)

    Wednesday, July 25, 2012 9:40 AM