Forum Discussion

Roger Roger's avatar
Roger Roger
Iron Contributor
May 14, 2018

search mailbox with key word

Hi experts

User1 has sent an email to User2  on May 01, and there was lot of email communications happened that day between user1 and user2. User1 says that he sent an email on May01 , user2 says that it was received on May05, here user2 may be lieing. 

how to trace that user1 has to sent an email to user2 with key word for example:(agree) in email body on May 01 not with subject. 

  • You cannot search the message trace logs by keyword. You can do an eDiscovery search or use the Search-Mailbox cmdlet, but that will not show you the mail flow info, only whether the message is currently present in that mailbox.

    • Roger Roger's avatar
      Roger Roger
      Iron Contributor

      if i need to search email body with the  word rejected. will the below syntax work.

       

      Get-Mailbox  -Identity User2| Search-Mailbox  -SearchQuery {from:user1@domain.com AND Received:"5/1/2018 12.00..05/5/2018 23:59"} -TargetMailbox <rejected> -TargetFolder "User1_User2_search05052018" -LogOnly -LogLevel Full

       

      Get-Mailbox  -Identity User1 | Search-Mailbox  -SearchQuery {to:user2@domain.com AND Send:"5/1/2018 12.00..05/5/2018 23:59"} -TargetMailbox <rejected> -TargetFolder "User1_User2_search05052018" -LogOnly -LogLevel Full

      • VasilMichev's avatar
        VasilMichev
        MVP

        It should work, however this will not tell you when the message arrived in the mailbox or any other related mail flow information. For that you need the message trace data.

Resources