Applies to: Exchange Server 2013
Topic Last Modified: 2012-10-16
You can use the Shell to create an email address policy by using recipient filters. To learn more about email address policies, see Email Address Policies.
For additional management tasks related to email address policies, see Email Address Policy Procedures.
What do you need to know before begin?
- Estimated time to complete: 5 minutes.
- 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.
Important: If you use a recipient filter to create or edit an email address policy, you can't use the Exchange Administration Center (EAC) to edit the email address policy. You must use the Shell. For detailed syntax and parameter information, see Set-EmailAddressPolicy. - You need to be assigned permissions before you can perform this
procedure or procedures. To see what permissions you need, see the
"Email address policies" entry in the Email Addresses and
Address Books topic.
- Before an SMTP address domain can be used in an email address
policy, you must configure an accepted domain. For more, see
Accepted
Domains.
- For information about keyboard shortcuts that may apply to the
procedures in this topic, see Keyboard Shortcuts in
the Exchange Admin Center.
Warning: |
---|
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection |
Use the Shell to create an email address policy by using recipient filters
To create an email address policy by using recipient filters, use the following syntax.
Copy Code | |
---|---|
New-EmailAddressPolicy -Name <String> -RecipientFilter <String> |
This example creates an email address policy that applies to all executives and for which the local part of the email address consists of the first two letters of their first name and their entire last name.
Copy Code | |
---|---|
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.