Create a Transport Rule

 

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Transport rules can be created on a Hub Transport or an Edge Transport server. Both server roles have many common predicates and actions, but some predicates and actions are exclusive to each transport server role. This topic describes how to create a transport rule by using either the EMC or the Shell.

Looking for other management tasks related to transport rules? Check out Managing Transport Rules.

Warning

Before you create or modify transport rules in your production environment, we recommend that you use a test environment to understand how transport rules work. Test all rules before creating them in a production environment.

Important

For transport rules to be applied to e-mail messages, a route must exist that enables the message to enter and leave a server that applies transport rules. Also, the message must not be subject to an administrator-configured transport restriction that prevents its delivery. If a transport restriction prevents delivery of a message, the Transport Rules agent can't act on that message, and no Transport Rules agent events are logged.

What Do You Want to Do?

  • Use the EMC to create a transport rule

  • Use the Shell to create a transport rule

Use the EMC to create a transport rule

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Transport rules" entry in the Messaging Policy and Compliance Permissions topic.

  1. Navigate to Organization Configuration > Hub Transport.

  2. In the result pane, click the Transport Rules tab.

  3. In the action pane, click New Transport Rule.

  4. On the Introduction page, complete the following fields:

    1. Name   Type a name for the transport rule.

    2. Comment   (optional) You can use this field to describe the rule's functionality and relevant details such as a change request or trouble ticket number, date, and name of administrator. Text in the comments field has no impact on rule functionality.

    3. Enable Rule   New rules are enabled by default. If you want the rule to be created in a disabled state, clear the check box.

  5. On the Conditions page, complete the following fields:

    1. In the Step 1. Select condition(s) box, select all the conditions that you want to apply to this rule.

      Important

      If you want this rule to be applied to all e-mail messages, don't select any conditions in this step.

    2. If you selected conditions in the Select Conditions box, in the Step 2. Edit the rule description by clicking an underlined value box, click each blue underlined word.

    3. When you click a blue underlined word, a new window opens to prompt you for the values to apply to the condition. Select the values that you want to apply, or type the values manually. If the window requires that you manually add values to a list, type a value. Then click Add. Repeat this process until you have entered all the values, and then click OK to close the window.

    4. Repeat the previous step for each condition that you selected. After you configure all the conditions, click Next.

  6. On the Actions page, complete the following fields:

    1. In the Step 1. Select actions box, select all the actions that you want to apply to this rule.

    2. In the Step 2. Edit the rule description by clicking an underlined value box, click each blue underlined word.

    3. In the new window that appears, select the items that you want to apply, or type the values manually, and then click OK to close the window.

    4. Repeat the previous step for each action that you selected. After you configure all the actions, click Next.

  7. On the Exceptions page, complete the following fields:

    1. In the Step 1. Select exceptions if necessary box, select all the exceptions that you want to apply to this rule. You don't have to select any exceptions.

    2. If you selected exceptions in the previous step, in the Step 2. Edit the rule description by clicking an underlined value box, click each blue underlined word.

    3. When you click a blue underlined word, a new window opens to prompt you to select the items that you want to add, or to type the values manually. When you have finished, click OK to close the window.

    4. Repeat the previous step for each exception that you selected. After you configure all the exceptions, click Next.

  8. On the Create Rule page, review the Configuration Summary. If you're satisfied with the configuration of the new rule, click New.

  9. On the Completion page, review the following, and then click Finish to close the wizard:

    • A status of Completed indicates that the wizard completed the task successfully.

    • A status of Failed indicates that the task wasn't completed. If the task fails, review the summary for an explanation, and then click Back to make any configuration changes.

Use the Shell to create a transport rule

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Transport rules" entry in the Messaging Policy and Compliance Permissions topic.

This example creates a new transport rule that prepends "Sales DG:" to messages sent from outside the organization to the DG-Sales distribution group.

New-TransportRule -Name "Rule1-SalesList" -FromScope NotInOrganization -SentTo "DG-Sales" -PrependSubject "Sales DG: "

Note

The rule parameters and action used in the above procedure are for illustration only. Review all the available transport rule predicates and actions to determine which ones meet your requirements.

For More Information

Understanding Transport Rules

Transport Rule Predicates

Transport Rule Actions

Transport Rules

 © 2010 Microsoft Corporation. All rights reserved.