Conditions and Exceptions for Transport Rules

Applies to: Office 365 for enterprises, Live@edu

Rules, also known as transport rules control the flow of e-mail messages in an organization. Conditions identify the messages you want the rule to apply to, and exceptions override the conditions and prevent the rule from acting on particular messages.

By default, when you create a new rule, you select from an abbreviated list of the most commonly-used conditions, and you don't specify any exceptions. However, if you click More Options, you see the complete list of conditions and exceptions, and you can specify multiple conditions and exceptions.

The available conditions and exceptions are exactly the same. However, conditions identify messages you want the rule to apply to, and exceptions exclude messages you don't want the rule to apply to.

Let's take a look at all the conditions and exceptions you can apply to a new rule or an existing rule at Manage My Organization > Mail Control > Rules.

Senders

Attachments

Sender and recipient relationships

Recipients

Message properties

Message headers

Message subject or body

To and Cc fields

Apply to all messages

Note   Several of the conditions and exceptions search for text in the various components of an e-mail message. These text searches operate as follows:

  • If the condition or exception contains the phrase "includes any of these words", the search looks for the specified text as typed. The search isn't case-sensitive, and the text can be surrounded by spaces and punctuation marks.
    For example, "contoso" matches " Contoso.". However, if the text is surrounded by other characters, it isn't considered a match. For example, "contoso" doesn't match "acontoso" or "contosob". Also, the asterisk ( * ) is treated as a literal character and isn't used as a wildcard character.
  • If the condition or exception contains the phrase "matches these text patterns", the search uses a regular expression to look for text. A regular expression can look for normal text characters as typed, and you can use special characters to look for designated types of text. For example, "\d" matches any digit from 0 to 9. To learn more, see Regular Expressions in Transport Rules.

Senders

Condition or exception Description

The sender... is this person

Specify the message sender from the shared address book.

The sender... is external/internal

Specify whether the sender is inside or outside the organization.

A sender is inside the organization if either of the following conditions is true:

  • The sender's e-mail address is in an accepted domain that's configured as an authoritative domain or an internal relay domain.
  • The sender's e-mail address is in a remote domain where the IsInternal parameter is $true.

A sender is outside the organization if any of the following conditions is true:

  • The sender's e-mail address isn't in an accepted domain or a remote domain.
  • The sender's e-mail address is in an accepted domain that's configured as an external relay domain.
  • The sender's e-mail address is in a remote domain where the IsInternal parameter is $false.

The sender... is a member of this group

Specify the distribution group that the sender is a member of.

The sender... address includes any of these words

Specify text values to match in the sender's e-mail address.

The sender... address matches any of these text patterns

Specify the text patterns to match in the sender's e-mail address using regular expressions.

The sender... is in a recipient's supervision list

This option is available in Live@edu organizations only.

The sender is defined in a supervision list entry on a recipient's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.
  • They identify the user as a victim in the anti-bullying policy.

For more information, see Supervision Policies.

The sender... has specific properties containing any of these words

Specify the properties you want to search and the text values you want to find. The text values can appear anywhere in the specified property. You must select the properties from a predefined list.

Note   This condition or exception is useful only for senders that appear in the shared address book.

The sender... has specific properties matching these text patterns

Specify the properties you want to search, and the text patterns you want to find. You specify the text patterns using regular expressions. This condition or exception is useful only for senders that appear in the shared address book.

Top of page

Recipients

Condition or exception Description

The recipient... is this person

Specify the message recipient from the shared address book.

The recipient... is external/internal

Specify whether the recipient is inside or outside the organization.

A recipient is inside the organization if either of the following conditions is true:

  • The recipient's e-mail address is in an accepted domain that's configured as an authoritative domain or an internal relay domain.
  • The recipient's e-mail address is in a remote domain where the IsInternal parameter is $true.

A recipient is outside the organization if any of the following conditions is true:

  • The recipient's e-mail address isn't in an accepted domain or a remote domain.
  • The recipient's e-mail address is in an accepted domain that's configured as an external relay domain.
  • The recipient's e-mail address is in a remote domain where the IsInternal parameter is $false.

You can also specify whether the recipient is in an external partner organization. An external partner organization is a domain that's been configured for Domain Secure security.

Note   Domain Secure security is only available in on-premises Microsoft Exchange Server 2010 organizations. Cloud-based organizations may see the external partner organization options, but rules based on those options won't work.

The recipient... is a member of this group

Specify the group that the recipient is a member of.

The recipient... address includes any of these words

Specify the text values to match in the recipient's e-mail address.

The recipient... address matches any of these text patterns

Specify the text patterns to match in the recipient's e-mail address using regular expressions.

The recipient... is in the sender's supervision list

This option is available in Live@edu organizations only.

The recipient is defined in a supervision list entry on the sender's mailbox. Supervision list entries perform the following functions:

  • They specify individual exceptions for the user in the closed campus supervision policy.
  • They identify the user as a victim in the anti-bullying policy.

For more information, see Supervision Policies.

The recipient... has specific properties containing any of these words

Specify the properties you want to search, and the text values you want to find. You must select the properties from a predefined list.

Note   This condition or exception is useful only for recipients that appear in the shared address book.

The recipient... has specific properties matching these text patterns

Specify the properties you want to search, and the text patterns you want to find. You specify the text patterns using regular expressions. This condition or exception is useful only for recipients that appear in the address book.

Top of page

Message subject or body

Condition or exception Description

The subject or body... subject or body includes any of these words

Specify the text values to match in the message subject or body.

The subject or body... subject or body matches these text patterns

Specify the text patterns to match in the message subject or body using regular expressions.

The subject or body... subject includes any of these words

Specify the text values to match in the message subject only.

The subject or body... subject matches these text patterns

Specify the text patterns to match in the message subject only using regular expressions.

Top of page

Attachments

These conditions or exceptions examine attached files in messages. When you search for the file name or size of the attachments, all attachments are included in the search.

When you search the content of the attachments, only supported attachment types are included in the search. For a list of supported attachment types, see "Default Filters" in Default Filters for Exchange Search.

Note   You can't modify the list of supported attachment types in a cloud-based organization.

Condition or exception Description

Any attachment... content includes any of these words

Specify the text values to match in supported attachment types.

Any attachment... content matches these text patterns

Specify the text patterns to match in supported attachment types using regular expressions.

Any attachment... content can't be inspected

The content of an attachment can't be inspected if the attachment type isn't supported.

Any attachment... file name matches these text patterns

Specify the text patterns to match in any attachment file name using regular expressions.

Any attachment... is equal to or larger than

Specifies a maximum size for any attachment.

Top of page

Message properties

Condition or exception Description

The message properties... include the message type

From the list, select the message type:

  • Automatic Reply
  • Auto-forward
  • Encrypted
  • Calendaring
  • Permission controlled
  • Voice mail
  • Signed
  • Approval request
  • Read receipt

The message properties... include this classification

Select the message classification that's been applied to the message. For more information, see Understanding Message Classifications.

The message properties... is lacking any classification

Specify that no message classification has been applied to the message.

The message properties... include an SCL equal to or greater than

Select the maximum acceptable SCL that's been applied to the message. The SCL rating is a number between 0 and 9. A higher SCL rating indicates that a message is more likely to be spam.

The message properties include the importance level

From the list, select the importance level that's been applied to the message:

  • Low
  • Normal
  • High

Top of page

To and Cc fields

Condition or exception Description

The message... To field contains this person

Select the person that appears in the To field from the address book.

The message... To field contains a member of this group

Select the group that the person in the To field is a member of.

The message... Cc field contains this person

Select the person that appears in the Cc field from the address book.

The message... Cc field contains a member of this group

Select the group that the person in the Cc field is a member of.

The message... To or Cc fields contain this person

Select the person that appears in the To or Cc fields from the address book.

The message... To or Cc fields contain a member of this group

Select the group that the person in the To or Cc fields is a member of.

Top of page

Sender and recipient relationships

Condition or exception Description

The sender and the recipient... The sender's management relationship to a recipient is

Select from the following:

  • The sender is the recipient's manager   One or more of the recipients appear in the sender's list of direct reports.
  • The sender is in the recipient's list of direct reports   This indicates one of the recipients is the sender's manager.

The sender and the recipient... The message is between members of these groups

A member of one specified group sends a message to a member of another specified group. The members of the two groups can be the message sender or the message recipient.

The sender or recipient... The sender or recipient manager is this person

Select from the following:

  • The sender is the manager of the person selected from the address book.
  • The recipient is the manager of the person selected from the address book.

The sender and the recipient... The sender and recipient property compares as

Select the properties of the sender and the recipient you want to compare and decide if you want the property values to match. You select the properties from a predefined list. The result can be equals or does not equal. For example, you can set the condition or exception to be: "The Department value of the sender and the recipient must be equal" or "The CustomAttribute1 value of the sender and the recipient must not be equal".

Top of page

Message headers

The message header is a collection of required and optional header fields in the message. Examples of header fields are To, From, Cc, and Bcc. Official header fields are defined in RFC 2822. Unofficial header fields start with "X-" and are known as X-headers.

Condition or exception Description

A message header... includes any of these words

Specify the text values to match in the message header. You specify the header field name and the text value you want to match.

A message header... matches these text patterns

Specify the text patterns to match in the message header using regular expressions. You specify the header field name and the text value you want to match.

Top of page

Apply to all messages

[Apply to all messages] is only available as a condition, not an exception. If you select [Apply to all messages], you can't specify any other conditions.

Top of page