locked
Transport Rules filtering BCC recipients RRS feed

  • Question

  • Bcc recipients do not appear in the "To:" and "Cc:" header fields. 

    I would like to create a transport rule with a exception. The exception should trigger under the following conditions.

    1. Check what the recipient(s) are under the "Envelope To" header.
    2. Check what the recipient is under the "To" header.
    3. Check what the recipient(s) are under the "Cc" header.
    4. If the recipient under "Envelope To" does not exist under the "To" or "Cc" header then trigger the exception.

    Can anyone suggest how I would go about creating such a transport rule?

    Was thinking of something along the lines of

    $condition1 = Get-TransportRulePredicate HeaderContains
    $condition1.MessageHeader = "Envelope-to"
    $ET=$condition1.words

    $condition2 = Get-TransportRulePredicate HeaderContains
    $condition2.MessageHeader = "To"
    $To=$condition2.words

    $condition3 = Get-TransportRulePredicate HeaderContains
    $condition3.MessageHeader = "Cc"
    $cc=$condition3.words

    Then if $ET !match($To) or !match($Cc) exclude the rule.

    Not sure how to put it all together.

    Thank You





    Monday, September 30, 2013 2:13 PM