Transport Rule Actions
Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
This topic describes the transport rule actions that are available for a computer that has the Microsoft Exchange Server 2007 Hub Transport server role or the Edge Transport server role installed. This topic also describes the action properties and values. Both the Hub Transport server role and the Edge Transport server role can apply transport rules to e-mail messages that pass through the server roles. However, the actions that are available for each server role are different.
Actions and Action Properties
Actions are applied to e-mail messages that match the conditions and none of the exceptions that are present on transport rules, which are configured on Transport Rules agents. Each action affects e-mail messages in a different way. For example, an action can cause an e-mail message to be redirected to another address or to be dropped. Each action consists of the action itself, its action property, and the value of the property.
To assign a value to an action, you must determine the available action property for a specific action. For example, you must use the Address
action property together with the RedirectMessage
action. See Table 2 for the action properties that you must use for Hub Transport servers. See Table 3 for the action properties that you must use for Edge Transport servers.
Some actions require that you set two or more predicate properties, because some actions modify specific fields within sections of an e-mail message, such as the message header fields. When you specify an action to modify a message header, one action property specifies the specific header field to modify, and a second action property specifies the new value of the message header. In these cases, you must also specify a value for the second action property from the Additional Action Property column in Table 2 or Table 3, depending on the server role. For example, you can configure an action to modify the X-Test-Message-Source header field to a specific string, such as contoso.com
.
Table 1 lists the action properties that you can use with transport rules that are configured on a Hub Transport server or an Edge Transport server.
Table 1 Action properties for transport rules on a Hub Transport server or an Edge Transport server
Action property | Expected format | Description |
---|---|---|
|
|
On an Edge Transport server, On a Hub Transport server, |
|
Single message classification object |
For more information about message classification, see Overview of Message Classifications. |
|
Single delivery status notification (DSN) code of |
|
|
Single string |
|
|
Single value with the choices of |
|
|
Single value with the choices of |
|
|
Single value with the choices of |
|
|
Single value with the choices of |
|
|
Single string |
|
|
Single value with the choices of |
|
|
Single string |
|
|
Single string |
To prevent the string that is specified with the The |
|
Single string |
|
|
Single Integer |
|
|
Single value with the choices |
|
|
Single string |
|
Supported Actions on a Hub Transport Server
Table 2 lists the actions that can be used with transport rules that are configured on a Hub Transport server.
Table 2 Supported actions for transport rules on a Hub Transport server
Supported rule action | Action name | First action property | Additional action property | Description |
---|---|---|---|---|
log an event with message |
|
|
Not applicable |
|
prepend the subject with string |
|
|
Not applicable |
|
apply message classification |
|
|
Not applicable |
For more information about message classifications, see Overview of Message Classifications. |
append disclaimer text using font, size, color, with separator, and fallback to action if unable to apply |
|
|
|
|
set the spam confidence level to value |
|
|
Not applicable |
|
set header with value |
|
|
|
|
remove header |
|
|
Not applicable |
|
add a recipient in the To field addresses |
|
|
Not applicable |
|
copy message to addresses |
|
|
Not applicable |
|
blind copy (Bcc) the message to addresses |
|
|
Not applicable |
|
redirect message to addresses |
|
|
Not applicable |
|
send bounce message to sender with enhanced status code |
|
|
|
|
silently drop the message |
|
Not applicable |
Not applicable |
|
Supported Actions on an Edge Transport Server
Table 3 lists the actions that can be used with transport rules that are configured on an Edge Transport server.
Table 3 Supported actions for transport rules on an Edge Transport server
Supported rule action | Action name | First action property | Additional action property | Description |
---|---|---|---|---|
log an event with message |
|
|
Not applicable |
|
prepend the subject with string |
|
|
Not applicable |
|
set the spam confidence level to value |
|
|
Not applicable |
|
set header with value |
|
|
|
|
remove header |
|
|
Not applicable |
|
add a recipient in the To field addresses |
|
|
Not applicable |
|
copy the message to addresses |
|
|
Not applicable |
|
blind carbon copy (Bcc) the message to addresses |
|
|
Not applicable |
|
drop connection |
|
Not applicable |
Not applicable |
|
redirect the message to addresses |
|
|
Not applicable |
|
put message in quarantine |
|
Not applicable |
Not applicable |
Important The QuarantineMailbox parameter on the Set-ContentFilterConfig cmdlet must be populated, and the specified mailbox must exist before you configure the put message in quarantine action. If the QuarantineMailbox parameter isn't populated or if the quarantine mailbox doesn't exist, messages sent to the quarantine mailbox will be lost and a non-delivery report will be generated. For more information about the spam quarantine mailbox, see Configuring and Managing Spam Quarantine. |
reject the message with status code and response |
|
|
|
For more information about DSNs, see Managing Delivery Status Notifications. |
silently drop the message |
|
Not applicable |
Not applicable |
|
Matching Multiple Rules
If a message matches the criteria for multiple rules, the actions are applied based on priority. Rules that have a lower priority are processed first. Then, rules that have a higher priority are processed. The resultant action depends on the rules that have been configured.
For example, consider the following scenarios.
Scenario 1
You have two transport rules, each of which is configured to add disclaimer text to a message.
A message matches both rules.
In this scenario, the lower priority rule is processed first. Therefore, the disclaimer that is specified by the lower priority rule is added to the message. Then, the higher priority rule is processed. Therefore, the disclaimer that is specified by the higher priority rule is added to the message.
In this scenario, the received e-mail message will have both disclaimers added.
Scenario 2
You have two transport rules, each of which modifies the Spam Confidence Level (SCL) value of a message.
A message matches both rules.
In this scenario, the lower priority rule is processed first. Therefore, the SCL value of the message is modified to what is specified by the lower priority rule. Then, the higher priority rule is processed. Therefore, the SCL value of the message is modified to what is specified by the higher priority rule.
In this scenario, the received e-mail message will have the SCL value of the highest priority rule.
Assigning Addresses on a Hub Transport Server
The Addresses
action property on a Hub Transport server requires that you pass a full mailbox, contact, mail-enabled user, or distribution group object to the property. Simple Mail Transfer Protocol (SMTP) e-mail addresses aren't valid values for this property. Values that are assigned to the Addresses
action property must be in an array.
To pass a mailbox, contact, mail-enabled user, or distribution group object to the Addresses
action property, you must call the appropriate Exchange Management Shell command from within the array and supply the command with the identity or name of the object. You must enclose the command name and identity in parentheses. Use the following command syntax:
$Action.Addresses = @((Get-Mailbox <Mailbox Name>), (Get-MailContact <Contact Name>), (Get-MailUser <Mail-Enabled User>), (Get-DistributionGroup <Distribution Group Name>))
To assign values to the Addresses action property
Run the following command to assign a single mailbox object:
$Action.Addresses = @((Get-Mailbox "Ted Bremer"))
Run the following command to assign a single mail contact object:
$Action.Addresses = @((Get-MailContact "Masato Kawai"))
Run the following command to assign a single mail-enabled user object:
$Action.Addresses = @((Get-MailUser "Pilar Ackerman"))
Run the following command to a single distribution group object:
$Action.Addresses = @((Get-DistributionGroup "Sales Group"))
Run the following command to assign a mix of mailbox, user, and distribution group objects:
$Action.Addresses = @((Get-Mailbox "Ted Bremer"), (Get-Mailbox "Kim Akers"), (Get-MailContact "Pilar Ackerman"), (Get-MailContact "Adam Barr"), (Get-MailUser "Chris Meyer"), (Get-DistributionGroup "Marketing Group"), (Get-DistributionGroup "Research Group"))
Assigning Addresses on an Edge Transport Server
The Addresses
action property on an Edge Transport server requires that you pass an SMTP e-mail address to the property. This is because Edge Transport servers do not have access to the recipient objects contained in the Active Directory directory service and because you may want to specify an e-mail address that is not within your Exchange organization. Values that are assigned to the Addresses
action property must be in an array.
To pass an SMTP address to the Addresses
action property, you must call enclose the SMTP e-mail address in double quotation marks. Use the following command syntax:
$Action.Addresses = @("<SMTP e-mail address 1>","<SMTP e-mail address 2>", "< SMTP e-mail address...>" )
To assign values to the Addresses action property
Run the following command to assign an array of SMTP e-mail addresses:
$Action.Addresses = @("sales@contoso.com", "research@contoso.com", "investors@nwtraders.com ")
For More Information
For detailed syntax and parameter information about each command, see the following topics:
For more information about transport rules, see the following topics: