none
Mail Flow Rule

    Question

  • We have created the couple of mail flow rules, where based on certain condition it will be forwarded to the moderator. These rules are working fine.

    Our requirement is to generate a report on the number of emails processed through each rule, and we need details of those emails like "Sender Mail ID", "Recipient Mail ID" and date. 

    I am not able to generate this report, can any PowerShell guru can help me out with a command to generate such report.

     

     

    Thanks, Vijesh Rajan

    Monday, August 7, 2017 10:59 AM

Answers

  • Hi Vijesh,

    Try the following command and check if any helps:

    Get-MessageTrackingLog -EventId "INITMESSAGECREATED" |ft Sender,Recipient,Timestamp

    EventID "INITMESSAGECREATED" means that the message was sent to a moderated recipient, so the message was sent to the arbitration mailbox for approval. According to your description, all the rules are used to forward the message to the moderator, the above command will list all the messages have been processed by the transport rules, and list the sender, recipient, date also.

    Hope it helps,

    Best Regards,


    Niko Cheng
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Tuesday, August 8, 2017 9:30 AM
    Moderator

All replies

  • $Temp = Search-MessageTrackingReport -Identity "David Jones" -Recipients "wendy@contoso.com" Get-MessageTrackingReport -Identity $Temp.MessageTrackingReportID -ReportTemplate Summary

    https://technet.microsoft.com/en-us/library/dd351082(v=exchg.160).aspx

    Try that.


    Brian Baldock | MCTS | MS | MCP

    Please note: This post is provided as is with no guarantee.

    Test, then test again.

    Monday, August 7, 2017 11:13 AM
  • You can run the Message trackinglog cmdlet to find out mail flow rule transaction. Once you zero'ed in the Event id, you need to run get-messagetrackinglog filtering the event id(s). By default, Message tracking logs are kept for 30 days.
    Monday, August 7, 2017 11:19 AM
  • Hi Vijesh,

    Try the following command and check if any helps:

    Get-MessageTrackingLog -EventId "INITMESSAGECREATED" |ft Sender,Recipient,Timestamp

    EventID "INITMESSAGECREATED" means that the message was sent to a moderated recipient, so the message was sent to the arbitration mailbox for approval. According to your description, all the rules are used to forward the message to the moderator, the above command will list all the messages have been processed by the transport rules, and list the sender, recipient, date also.

    Hope it helps,

    Best Regards,


    Niko Cheng
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Tuesday, August 8, 2017 9:30 AM
    Moderator
  • Thanks Niko for your solution it worked perfectly.

    Thanks Brian & Raj for your pointing me the direction.


    Thanks, Vijesh Rajan

    Thursday, August 10, 2017 3:57 AM
  • You're welcome, happy helped.

    Best Regards,


    Niko Cheng
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, August 10, 2017 6:31 AM
    Moderator