Aracılığıyla paylaş


Create an E-Mail Address Policy By Using Recipient Filters

 

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

You can use the Shell to create an e-mail address policy by using recipient filters. To learn more about e-mail address policies, see Understanding E-Mail Address Policies.

Looking for other management tasks related to e-mail address policies? Check out Managing E-Mail Address Policies.

Prerequisites

  • Before an SMTP address domain can be used in an e-mail address policy, you must configure an accepted domain. For information about configuring accepted domains, see Understanding Accepted Domains.

  • To use the RecipientFilter parameter to create a custom filter, you must specify a string for the filter. The Shell uses OPath for the filtering syntax. OPath is a querying language designed to query object data sources. For more information about the OPath filtering syntax, see Creating Filters in Recipient Commands.

    Important

    If you use a recipient filter to create or edit an e-mail address policy, you can't use the EMC to edit the e-mail address policy. You must use the Set-EmailAddressPolicy cmdlet in the Shell. For detailed syntax and parameter information, see Set-EmailAddressPolicy.

Use the Shell to create an e-mail address policy by using recipient filters

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "E-mail address policies" entry in the Mailbox Permissions topic.

Note

You can't use the EMC to create an e-mail address policy by using recipient filters.

To create an e-mail address policy by using recipient filters, use the following syntax.

New-EmailAddressPolicy -Name <String> -RecipientFilter <String>

This example creates an e-mail address policy that applies to all executives and for which the local part of the e-mail address consists of the first two letters of their first name and their entire last name.

New-EmailAddressPolicy -Name 'Execs' -EnabledEmailAddressTemplates 'SMTP:%2g%s@contoso.com' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Title -like 'executive'))}

For detailed syntax and parameter information, see New-EmailAddressPolicy.

 © 2010 Microsoft Corporation. All rights reserved.