locked
Transport Rule RRS feed

  • Question

  • Hi,

    I am trying to configure a transport rule on exchange 2007. The idea is to BCC emails to a mailbox ,  going OUT to some specific domains from any of mu users . This can be "to, bcc or cc"  Not sure how to achieve this.


    Raj

    Wednesday, February 8, 2012 12:02 PM

All replies

    • Proposed as answer by Xiu Zhang Thursday, February 9, 2012 9:24 AM
    • Unproposed as answer by Rajnish R Sharma Thursday, February 9, 2012 10:30 AM
    Wednesday, February 8, 2012 2:00 PM
  • It will not work for specific domains. I tried to play with the script but still not go. Do any body want to change anything in the below script.

    $condition = Get-TransportRulePredicate HeaderContains
    $condition.MessageHeader = "To"
    $condition.words= @("@****.com")
    $action = Get-TransportRuleAction BlindCopyTo
    $Action.Addresses = @((Get-Mailbox "mail.back"))
    new-TransportRule "Tracking2" -conditions $condition -action $action

    Also, how do i add cc and bcc as well.

    I was able to get the incoming mails from sepcific domains to the mailbox. The above mentioned script is from outgoing to the same domains.


    Raj

    Thursday, February 9, 2012 10:34 AM
  • When you match on "contains words", whatever you're match must appear space-delimited in the email.

    e.g. in a subject line of "This is a my subject line", "subject" is a word.  "ject" is not.

    To match only part of an email address use the "matches text patterns" predicate.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Thursday, February 9, 2012 11:57 AM