Applies to: Exchange Server 2007 SP3, Exchange Server
2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-04-09
This topic describes the predicates, predicate properties, and
values that are available for a computer that has the
Microsoft Exchange Server 2007 Hub Transport server
role or the Edge Transport server role installed. The
Addresses
predicate property is also described in
detail because of its complexity.
In Exchange 2007, the Transport Rules agents use predicates to populate the conditions and exceptions that are used with a transport rule. 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 predicates that are available for each server role are different.
Predicates and Predicate Properties
Predicates instruct a condition or an exception to examine a specific piece of an e-mail message to determine whether the transport rule should be applied to that message. Some predicates examine the To or From fields of a message, whereas others examine the subject, body, or attachment size. To determine whether a transport rule should be applied to a message, most predicates require that you specify a value that the predicates will use to test against the message. These values are assigned to one or more predicate properties. Some predicates do not require predicate properties.
To assign a value to a predicate, you must determine
the predicate property of the predicate. For example, you must use
the Words
predicate property together with the
SubjectContains
condition. See Table 2 for the
predicate properties that you must use for Hub Transport servers.
See Table 3 for the predicate properties that you must use for
Edge Transport servers.
Some predicates require that you set two predicate
properties, because some predicates examine specific fields within
sections of an e-mail message, such as the message header fields.
When you specify a predicate to examine a message header, one
predicate property specifies the specific header field to examine,
whereas the second predicate property specifies the value of the
message header to test for. In these cases, you must also specify a
value for the second predicate property from the Second Predicate
Property column of Table 2 and Table 3, depending on the
server role. For example, you can configure a predicate to examine
the Message-ID header field for a specific string, such as
contoso.com
.
Table 1 lists the predicate properties that you can use with transport rules that are configured on a Hub Transport server or an Edge Transport server.
Table 1 Predicate properties for transport rules on a Hub Transport server or an Edge Transport server
Predicate property | Expected format | Description |
---|---|---|
|
Array of Active Directory mailbox, contact, or distribution group objects |
|
|
Message classification object |
|
|
Single value of |
|
|
Array of regular expressions |
The |
|
Single string |
|
|
Single integer |
|
|
Single value of |
A sender or recipient is considered inside the organization if either of the following conditions is true:
To determine whether mail-enabled contacts are considered inside or outside the organization, the domain part of the address of the recipient or sender is compared with the accepted domains list as described earlier in this section. For more information about accepted domains, see Managing Accepted Domains. |
|
Single integer with quantifier, such as |
Unqualified integers are treated as bytes. |
|
Array of strings |
The |
Supported Predicates on a Hub Transport Server
Table 2 lists the predicates that can be used with transport rules that are configured on a Hub Transport server.
Table 2 Supported predicates for transport rules on a Hub Transport server
Supported rule predicate | Predicate name | First predicate property | Second predicate property | Description |
---|---|---|---|---|
from people |
|
|
Not applicable |
|
from a member of distribution list |
|
|
Not applicable |
|
from users inside or outside the organization |
|
|
Not applicable |
|
sent to people |
|
|
Not applicable |
|
sent to a member of distribution list |
|
|
Not applicable |
|
sent to users inside or outside the organization |
|
|
Not applicable |
|
between members of distribution list and distribution list |
|
|
|
|
when any of the recipients in the To field is people |
|
|
Not applicable |
|
when any of the recipients in the To field is a member of distribution list |
|
|
Not applicable |
|
when any of the recipients in the Cc field is people |
|
|
Not applicable |
|
when any of the recipients in the Cc field is a member of distribution list |
|
|
Not applicable |
|
when any of the recipients in the To or Cc fields are people |
|
|
Not applicable |
|
when any of the recipients in the To or Cc fields is a member of distribution list |
AnyOfToCcHeaderMemberOf |
|
Not applicable |
|
when the Subject field contains specific words |
|
|
Not applicable |
|
when the Subject field or the body of the message contains specific words |
|
|
Not applicable |
|
when a message header contains specific words |
|
|
|
|
when the From address contains specific words |
|
|
Not applicable |
|
when the Subject field contains text patterns |
|
|
Not applicable |
|
when the Subject field or the body of the message contains text patterns |
|
|
Not applicable |
|
when the message header contains text patterns |
|
|
|
|
when the From address contains text patterns |
|
|
Not applicable |
|
when any attachment file name contains text patterns |
|
|
Not applicable |
|
with a spam confidence level (SCL) rating that is greater or equal to limit |
|
|
Not applicable |
|
when the size of any attachment is greater than or equal to limit |
|
|
Not applicable |
|
marked with classification |
|
|
Not applicable |
|
marked with importance |
|
|
Not applicable |
|
Supported Predicates on an Edge Transport Server
Table 3 lists the predicates that can be used with transport rules that are configured on an Edge Transport server.
Table 3 Supported predicates for transport rules on an Edge Transport server
Supported rule predicate | Predicate name | First predicate property | Second predicate property | Description |
---|---|---|---|---|
when the Subject field contains specific words |
|
|
Not applicable |
|
when the Subject field or the body of the message contains specific words |
|
|
Not applicable |
|
when a message header contains specific words |
|
|
|
|
when the From address contains specific words |
|
|
Not applicable |
|
when any recipient address contains specific words |
|
|
Not applicable |
|
when the Subject field contains text patterns |
|
|
Not applicable |
|
when the Subject field or the body of the message contains text patterns |
|
|
Not applicable |
|
when the message header contains text patterns |
|
|
|
|
when the From address contains text patterns |
|
|
Not applicable |
|
when text patterns in any of recipient address |
|
|
Not applicable |
|
with a spam confidence level (SCL) rating that is greater than or equal to limit |
|
|
Not applicable |
|
when the size of any attachment is greater than or equal to limit |
|
|
Not applicable |
|
from users inside or outside the organization |
|
|
Not applicable |
|
Assigning Addresses to Conditions and Exceptions
The Addresses
predicate property 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
predicate property must be in an array.
To pass a mailbox, contact, mail-enabled user, or
distribution group object to the Addresses
predicate
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:
$Condition.Addresses = @((Get-Mailbox <Mailbox
Name>), (Get-MailContact <Contact Name>), (Get-MailUser
<Mail-Enabled User>), (Get-DistributionGroup <Distribution
Group Name>))
-
Run the following command to assign a single mailbox object:
Copy Code $Condition.Addresses = @((Get-Mailbox "Ted Bremer"))
-
Run the following command to assign a single mail contact object:
Copy Code $Condition.Addresses = @((Get-MailContact "Masato Kawai"))
-
Run the following command to assign a single mail-enabled user object:
Copy Code $Condition.Addresses = @((Get-MailUser "Pilar Ackerman"))
-
Run the following command to a single distribution group object:
Copy Code $Condition.Addresses = @((Get-DistributionGroup "Sales Group"))
-
Run the following command to assign a mix of mailbox, user, and distribution group objects:
Copy Code $Condition.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"))
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: