Email address policies define the format of email addresses Exchange creates for mail-enabled objects such as mailboxes and groups. Exchange 2013 applies email address policies in a consistent and immediate manner because the Exchange Management Shell (EMS) cmdlets that create or update mail-enabled recipients call a common set of business logic. The only way to stop Exchange from applying an email address policy to an object is to exclude it explicitly from these updates. For example:
Set-Mailbox –Identity 'David Pelton' –EmailAddressPolicyEnabled $False
Typically, the effect of an email address policy is felt when a new mail-enabled object is created or updated or after an administrator changes a policy that creates a new email address type or format. After you install Exchange 2013 for the first time, the installation creates a default policy under the Mail Flow section of Exchange Administration Center (EAC). (Installing Exchange 2013 in an existing organization preserves whatever address policies are already in place.) The default email address policy creates email addresses by using the alias assigned to the object plus the SMTP domain of the Exchange organization and is applied to every mail-enabled object until another email address policy is created with a higher priority. For example, an object with an alias of TR in the contoso.com organization will receive an SMTP address of [email protected].
Behind the scenes, each email address policy uses a recipient filter to determine the objects that come within the scope of the policy. Logically, the default email address policy must have a very broad recipient filter because it has to apply to any object for which Exchange can find no other matching email address policy. The recipient filter for the default email address policy is very simple because the filter catches everything. You can see details of the policy with the Get-EmailAddressPolicy cmdlet:
Get-EmailAddressPolicy –Identity 'Default Policy' | Select Name, *Filter*, *Exch*
Name : Default Policy RecipientFilter : Alias -ne $null LdapRecipientFilter : (mailNickname=*) LastUpdatedRecipientFilter : Alias -ne $null RecipientFilterApplied : True RecipientFilterType : Precanned ExchangeVersion : 0.1 (8.0.535.0)
This policy is the same as used with Exchange 2010, and its recipient filter ensures a match against all recipients that have an alias. It uses a simple filter that is preset within Exchange rather than a custom-coded filter that is designed to select a specific group of recipients. Precoded and custom filters, and how they underpin dynamic distribution groups. Setting 8.0.535.0 as the value for the ExchangeVersion property enables any of the Exchange servers that operate alongside Exchange 2013 to manage the policy.
Email policy priority
Several email address policies can exist within an organization. All of them generate email addresses for the mail-enabled objects that fall within their scope, and these email addresses are valid for both external and internal communication. Note that email addresses can be generated for accepted domains only.
It is generally a good idea to restrict the number of email address policies in use to the minimum possible because it can become complicated to understand where email addresses originate, especially when policies are based on different recipient properties. For example, a mailbox might have email addresses generated by the following policies:
- A specific departmental or geographic email address policy (for example, [email protected] or [email protected])
- A more general industry-standard template for SMTP, such as first name.last [email protected] (for example,[email protected])
- The Exchange default email address policy based on mailbox alias (for example, [email protected])
When an object has multiple email addresses, the primary email address is placed on outgoing messages to allow recipients to respond to those messages and have the replies routed back to Exchange for delivery to the correct mailbox. The other addresses are referred to as proxy addresses and are present so Exchange knows how to process messages sent to those addresses. Sometimes proxy addresses are maintained for backward compatibility. For example, if the company has changed its name and Internet domain, you could decide to retain all the email addresses from the old domain as proxy addresses on mailboxes so that external correspondents who reply to messages sent from the old domain can still be routed correctly.
Each email address policy is assigned a priority or sequence order. (One is the highest priority.) You can use the up and down arrows EAC displays to increase or decrease the priority of an email address policy or run the Set-EmailAddressPolicy cmdlet in EMS:
Set-EmailAddressPolicy –Identity 'IT Department' -Priority '1'
Figure 1 shows that three email address policies are currently defined for the organization. A department-specific policy has precedence, followed by a general policy that applies to all recipients and then the default policy created when Exchange is installed.
Figure 1. Viewing email address policies for an organization
Not every email address policy might apply to an object. Exchange searches the policies in priority order to find the highest-rated policy to use when it needs to apply a policy to an object, and the address generated by that policy becomes the default email address for the object. The practical effect is that this address is used as a reply address for outgoing messages. You can see the email addresses created for an object by viewing its properties. You can see from Figure 2 that the mailbox has three email addresses with the default or primary address identified by showing its format (SMTP) in uppercase. You can also see that this mailbox is under the control of email policies because the check box is set to enforce this condition.
Figure 2. Viewing the email addresses for a mailbox
When you create the first custom email address policy within an organization, it is automatically assigned a priority of one, and the default policy is moved down to a special priority of lowest to ensure that any custom email address policy takes precedence. The default email address policy should serve as the catch-all policy that ensures that an email address is assigned to every object and is therefore given the lowest priority.