Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-05-22

This topic explains how to use the Exchange Management Console or the Exchange Management Shell to configure transport rules to copy or redirect messages to a catch-all mailbox on a computer that has the Edge Transport server role installed.

A catch-all mailbox is typically a mailbox in your organization that is used to collect all the e-mail messages that are sent to your organization. Depending on your preferences, the catch-all mailbox may receive all messages or only messages that are sent to mailboxes that do not exist. You can configure transport rules on Edge Transport servers to copy or redirect messages that are received by your organization to the catch-all mailbox.

To configure a catch-all mailbox, you must perform the following actions that are described later in this topic:

Before You Begin

To configure a catch-all mailbox, you must use transport rules that run on Edge Transport servers. Also, you must disable recipient filtering on those Edge Transport servers. You must do this because messages pass through the Recipient Filter agent before passing through the Edge Rule agent. To prevent messages from being rejected by the Recipient Filter agent because a mailbox does not exist, you must disable recipient filtering.

When you disable recipient filtering, some features that depend on the Recipient Filter agent no longer work. Before you disable recipient filtering, you should understand the benefits of running the Recipient Filter agent and understand what features depend on it. For more information about the Recipient Filter agent and how it helps reduce the effect of spam, denial of service attacks (DoS), and other threats, see Recipient Filtering.

Note:
Recipients are resolved before messages pass through the Transport Rules agent on Hub Transport servers. Therefore, transport rules on Hub Transport servers can't be used to copy or redirect messages to a catch-all mailbox.

To create a new transport rule to copy or redirect messages to a catch-all mailbox, you use the same procedure that you use to create a new transport rule. The transport rule conditions, exceptions, and actions in this procedure are specific to transport rules that run on Edge Transport servers.

For more information about transport rules, see Overview of Transport Rules.

To perform the following procedures on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Creating a Mailbox

You must create a new mailbox that will receive the messages that are copied or redirected to it by transport rules. Because this mailbox may contain sensitive messages, you should restrict access to this mailbox. Additionally, depending on the volume of messages that are received by the mailbox, you may have to perform one or both of the following steps:

  • Increase the mailbox quota limits.

  • Configure Messaging Records Management to automatically remove messages from the mailbox that are older than a configured age.

After you create the mailbox, note the Simple Mail Transfer Protocol (SMTP) address assigned to the mailbox.

For more information about how to create and manage the catch-all mailbox, see the following topics:

Disabling Recipient Filtering

You must disable recipient filtering on each Edge Transport server on which you want to configure transport rules to copy or redirect messages to a catch-all mailbox. To disable recipient filtering, you must disable the Recipient Filter agent. The following procedures show you how to disable the Recipient Filter agent by using the Exchange Management Console and the Exchange Management Shell.

To disable recipient filtering by using the Exchange Management Console on an Edge Transport server

  1. Open the Exchange Management Console on the Edge Transport server on which you want to create the new transport rule.

  2. In the console tree, click Edge Transport.

  3. In the result pane, click the Anti-spam tab.

  4. In the action pane, right-click Recipient Filtering, and then select Disable.

To disable recipient filtering by using the Exchange Management Shell on an Edge Transport server

  1. Run the following command:

    Copy Code
    Disable-TransportAgent "Recipient Filter Agent"
    
  2. When you are asked whether you want to perform this action, type Yes, and press ENTER.

Configuring a Transport Rule to Copy or Redirect Messages to the Catch-All Mailbox

After you have created a mailbox to accept messages and you have disabled recipient filtering, you must create a transport rule to copy or redirect messages to the catch-all mailbox. You must configure this transport rule on each Edge Transport server on which you want to copy or redirect messages.

In most organizations that use a catch-all mailbox, only messages that are received from senders outside the organization are copied or redirected to the mailbox. To achieve this functionality, you use the from users inside or outside the organization transport rule condition and set the value of the condition to Outside.

Your organization's requirements should determine whether you copy messages to the catch-all mailbox or redirect messages to the catch-all mailbox. The following list describes the difference between the two actions:

  • Message is copied   When a message is copied to the catch-all mailbox, the message continues to the original recipient while at the same time the message is also copied, through CC or Bcc, to the catch-all mailbox. If the original recipient doesn't exist, the sender receives a non-delivery report (NDR).

  • Message is redirected   When a message is redirected to the catch-all mailbox, the message doesn't continue to the original recipient. The message is sent only to the catch-all mailbox. If the original recipient doesn't exist, the sender doesn't receive an NDR.

You should also configure the except when the text patterns appears in any recipient address exception to avoid copying or redirecting messages to the catch-all mailbox for SMTP addresses that already exist in your organization. This exception uses regular expressions to prevent the transport rule from copying or redirecting messages to the catch-all mailbox if the SMTP address exists in your organization. You must manually configure the exception with the SMTP addresses in your organization and enclose each SMTP address with the ^ and $ pattern strings.

For more information about regular expressions, see Regular Expressions in Transport Rules.

Important:
A message that is sent to your organization will not be copied or redirected to the catch-all mailbox if one or more SMTP addresses included in the message recipients are configured on the transport rule exception. This is true even if one or more of the SMTP addresses on the message doesn't exist in your organization.

Using the Exchange Management Console to Copy or Redirect a Message to the Catch-All Mailbox

Follow these steps to configure a transport rule to copy messages to a catch-all mailbox or to redirect messages to a catch-all mailbox:

To use the Exchange Management Console to copy or redirect messages to a catch-all mailbox on an Edge Transport server

  1. Open the Exchange Management Console on the Edge Transport server on which you want to create the new transport rule.

  2. In the console tree, click Edge Transport.

  3. In the result pane, click the Transport Rules tab, and then in the action pane, click New Transport Rule… .

  4. In the Name field of the Transport Rule wizard, type the name of the transport rule.

  5. If you have notes for this rule, in the Comments field, type the notes.

  6. If you want the rule to be created in a disabled state, clear the Enabled check box. Otherwise, leave the Enabled check box selected.

  7. Click Next.

  8. In the Step 1. Select Condition(s) box, select the from users inside or outside the organization condition.

  9. In the Step 2. Edit the rule description (click an underlined value) box, click the blue underlined word Inside.

  10. When you click the blue underlined word Inside, a new window opens and a drop-down box appears. Select Outside from the drop-down box and then click OK to close the window.

  11. If you want to add conditions, do so now. After you configure all the conditions, click Next.

  12. In the Step 1. Select Action(s) box, select the copy the message to addresses action if you want to copy messages to the catch-all mailbox. Select redirect the message to addresses action if you want to redirect messages to the catch-all mailbox. Do not select both actions in the same transport rule.

  13. In the Step 2. Edit the rule description (click an underlined value) box, click the blue underlined word addresses.

  14. In the new window that appears, type the SMTP address of the catch-all mailbox you noted earlier in the "Creating a Mailbox" section, and then click Add. Then, click OK to close the window.

  15. If you want to configure additional actions, do so now. After you configure all the actions, click Next.

  16. In the Step 1. Select Exception(s) box, select the except when the text patterns appears in any recipient address exception.

  17. If you selected exceptions in the previous step, in the Step 2. Edit the rule description (click an underlined value) box, click the blue underlined words text patterns.

  18. In the window that appears, enter all the SMTP addresses of existing mailboxes in your organization. Enclose each SMTP address with the ^ and $ pattern strings. For example, if the SMTP address is david@contoso.com, enter: ^david@contoso.com$. Click Add after you enter each SMTP address. When you have finished, click OK to close the window.

  19. If you want to configure additional exceptions, do so now. After you configure all the exceptions, click Next.

  20. Review the Configuration Summary. If you are happy with the configuration of the new rule, click New, and then click Finish.

Using the Exchange Management Shell to Copy or Redirect a Message to the Catch-All Mailbox

To use the Exchange Management Shell to create a new transport rule to copy or redirect messages to a catch-all mailbox, you must be familiar with how to create a transport rule by using the Exchange Management Shell. For more information, see "Using the Exchange Management Shell to Create a Transport Rule" in How to Create a New Transport Rule.

To configure a transport rule to copy or redirect messages to a catch-all mailbox, you must configure the transport rule condition that tells the transport rule to apply the action only to messages that are sent from senders outside the organization. To do this, use the FromScope transport rule predicate on the Get-TransportRulePredicate cmdlet.

To use the Exchange Management Shell to configure the transport rule condition to select messages only from senders outside the organization

  • Run the following commands:

    Copy Code
    $Condition = Get-TransportRulePredicate FromScope
    $Condition.Scope = "NotInOrganization"
    

After you have configured the condition, you must configure the transport rule action. If you want to copy a message to the catch-all mailbox, you must use the CopyTo transport rule action. If you want to redirect messages to the catch-all mailbox, you must use the RedirectMessage transport rule action. Both actions are available on the Get-TransportRuleAction cmdlet. You must also use the following syntax to specify the SMTP address of the catch-all mailbox:

Copy Code
$Action.Addresses = @("<SMTP address of catch-all mailbox>")

To use the Exchange Management Shell to configure the transport rule action to copy messages to a catch-all mailbox

  • Run the following commands:

    Copy Code
    $Action = Get-TransportRuleAction CopyTo
    $Action.Addresses @("catch-all@contoso.com")
    

To use the Exchange Management Shell to configure the transport rule action to redirect messages to a catch-all mailbox

  • Run the following commands:

    Copy Code
    $Action = Get-TransportRuleAction RedirectMessage
    $Action.Addresses @("catch-all@contoso.com")
    

After you have run these commands, you must configure exceptions to avoid copying or redirecting messages to the catch-all mailbox for SMTP addresses that exist in your organization. To do this, use the AnyOfRecipientAddressMatches transport rule predicate on the Get-TransportRulePredicate cmdlet. You must also use the following syntax to specify the SMTP addresses that already exist in the organization:

Copy Code
$Exception.Addresses = @("^<Existing SMTP address 1>$", "^<Existing SMTP address 2>$", ...)

To use the Exchange Management Shell to configure the transport rule exception to avoid copying or redirecting messages that are sent to existing SMTP addresses that exist in your organization

  • Run the following commands:

    Copy Code
    $Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
    $Exception.Patterns = @("^david@contoso.com$", "^brian@contoso.com$", "^ray@contoso.com$")
    

Finally, you must create the transport rule by using the New-TransportRule cmdlet and specify each condition, action, and exception that you configured.

To use the Exchange Management Shell to create a transport rule that copies or redirects messages to a catch-all mailbox

  • Run the following commands:

    Copy Code
    New-TransportRule -Name "Copy messages to a catch-all mailbox" -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
    

Examples: Transport Rules Created By Using the Exchange Management Shell

The following procedures show how you can use the Exchange Management Shell to create transport rules to copy or redirect messages to a catch-all mailbox.

To use the Exchange Management Shell to copy messages to a catch-all mailbox on an Edge Transport server

  • Run the following commands:

    Copy Code
    $Condition = Get-TransportRulePredicate FromScope
    $Condition.Scope = "NotInOrganization"
    $Action = Get-TransportRuleAction CopyTo
    $Action.Addresses = @("catch-all@contoso.com")
    $Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
    $Exception.Patterns = @("^david@contoso.com$", "^brian@contoso.com$")
    New-TransportRule -Name "Copy messages to catch-all mailbox" -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
    

To use the Exchange Management Shell to redirect messages to a catch-all mailbox on an Edge Transport server

  • Run the following commands:

    Copy Code
    $Condition = Get-TransportRulePredicate FromScope
    $Condition.Scope = "NotInOrganization"
    $Action = Get-TransportRuleAction RedirectMessage
    $Action.Addresses @("catch-all@contoso.com")
    $Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
    $Exception.Patterns = @("^david@contoso.com$", "^brian@contoso.com$")
    New-TransportRule -Name "Redirect messages to catch-all mailbox" -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
    

For More Information