Transport-Rule in Exchange 2010 to prefix the Subject

Assume, you'd like to prepend the subject of an e-mail with a prefix, if the e-mail has been sent from the certain computer and if it has a certain sender name. In this case you can create a new transport rule with Powershell.

For example, the subject should be prepended by the phrase '[Alert]', if the From address contains '' AND if the computer's name, which the email is sent from, is ''. The powershell command below configures this:

-Name 'My_transport_rule' -Comments 'My comment'
-HeaderContainsMessageHeader 'Received' -HeaderContainsWords ' '
-FromAddressContainsWords '' -PrependSubject "[Alert] "

After the command has been executed the rule is active. It acts in the whole Exchange organization and is not restricted to a single server.

Please note that the argument for the parameter -HeaderContainsWords must contain the name, which the email program on the sender computer actually uses. If the new rule doesn't work as expected, look into the internet headers of a test e-mail and note the computer name, which is in the line Received.

1 Kommentare :: Transport-Rule in Exchange 2010 to prefix the Subject

  1. nice idea.. thanks for sharing..

Post a Comment