Export (0) Print
Expand All

Create an E-Mail Address Policy By Using Recipient Filters

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

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.

  • 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.
    Bb232194.important(en-us,EXCHG.140).gifImportant:
    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.

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.

Bb232194.note(en-us,EXCHG.140).gifNote:
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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft