E-mail Address Policies Exchange 2010

E-mail Address Policies in Exchange Server 2010

E-mail Address Policies control how Exchange displays a user’s secondary email address.  When you need additional SMTP addresses for your users, create a new E-mail Address Policy.  These polices are stored separately, and behave differently, from the other types of Microsoft Group Policy.

Topics for E-mail Address Policies in Exchange Server 2010

 ♠

Purpose of E-mail Address Policies in Exchange 2010

Exchange Server 2010 gives every mailbox-enabled user a default SMTP email address in the format: logonName @ anotherdom.com.  The point of an E-mail Address Policy is to tell Exchange 2010 how to define extra email addresses for users, groups or contacts.

Take as an example, a company with a main email address of anotherdom.com.  Suppose that this company bought a second company called companyB.net.  Wouldn’t it be useful if the companyB.net people could receive email addressed to accounts in both domains?  No problem, use Exchange 2010 to create E-mail Address Policies which adds a secondary SMTP address to their email settings.

Creating Exchange E-mail Address Policies E-mail Address Policies Exchange 2010

There are two ways of creating and managing E-mail Address policies, via the Exchange Management Console (EMC) or with a PowerShell cmdlet.

EMC Method

  • Launch the Exchange Console and drill down to the Hub Transport folder.
  • In the action pane, click New E-mail Address Policy.
  • The trick is to select the recipient container where the filter is going to apply.
  • It’s worth checking the conditions page to fine tune your policy.
  • Probably the most important page is where you specify the SMTP E-Mail Addresses.

Consider an email address:  [email protected].  Here is an example of the logic that Exchange 2010 uses to define the left part of the email address.  Exchange takes a user account alias, guyt in our example, the E-mail Address Policies then calculates the left side of the @, e.g. guyt@. and adds it to the domain name anotherdom.com.

Exchange will set the left part of the email address = logonName.  And you may wish to change this format with one or more of these clever variables.  For example, to build the displayName from the first 3 letters of the firstname added to the first 4 letters of the last name.  The secret of custom SMTP addresses is to control this family of % variables:

%g  = givenName. 
%s  = sn (Last name). 
%4s = means first four letters of sn.
%d  = displayName.
%m  = Exchange alias. 

Example: %3g.%[email protected]  translates to = [email protected]

Where can you see these actual email addresses?  Open Active Directory Users and Computers, select the user, properties tab and the Exchange e-mail tab.

Apply Your E-Mail Address Policy

Although the above E-mail address policies generate a secondary address nothing happens until you ‘Apply’ it, using the menu option in the EMC’s Action pane.

Creating E-mail Address Policy with PowerShell

The name of this cmdlet is New-EmailAddressPolicy, if you subsequently want to make changes use Set-EmailAddressPolicy.

New-EmailAddressPolicy -Name "Guy Special" `
-IncludedRecipients MailboxUsers `
-ConditionalStateorProvince "Boston","Worcester","Seatle" `
-EnabledEmailAddressTemplates "SMTP:%s%[email protected]"

Note 1: %s means Surname and %g Firstname

Note 2: ` (Back-tick) means continue the command on the next line.

Note 3: For more information on PowerShell see here.

Guy Recommends:  SolarWinds’ Free Bulk Mailbox Import ToolFree Download Bulk Mailbox Import Tool

Import users from a spreadsheet, complete with their mailbox.  Just provide a list of the users with the fields in the top row, and save as .csv file.  Then launch this FREE utility, match your Exchange fields with AD’s attributes, click and import the users.  Optionally, you can provide the name of the OU where the new mailboxes will be born.

There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:

  1. Bulk-import new users and mailboxes into Active Directory.
  2. Seek and zap unwanted user accounts.
  3. Find inactive computers.

Download your FREE bulk mailbox import tool.

Filtering with LDAP Queries

Whereas Exchange 2010 uses E-mail Address Policies, Exchange 2003 uses Recipient Policies to control how Exchange displays secondary email addresses. Another change in Exchange 2010 is that LDAP filters have been replaced by OPATH syntax.  

Set-EmailAddressPolicy "Default Policy" -IncludedRecipients AllRecipients

You can use the -RecipientFilter to mimic, or improve upon the Exchange 2003 LDAP filter.

You need PowerShell’s braces { } around the entire OPATH syntax string.  Here are the filtering operators, note you introduce each with a -hyphen.

  • -and
  • -or
  • -not
  • -eq (equals)
  • -ne (not equal)
  • -lt (less than)
  • -gt (greater than)
  • -like (string comparison)
  • -notlike (string comparison)  

Guy Recommends:  A Free Trial of the Network Performance Monitor (NPM)Review of Orion NPM v11.5 v11.5

SolarWinds’ Network Performance Monitor will help you discover what’s happening on your network.  This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.

What I like best is the way NPM suggests solutions to network problems.  Its also has the ability to monitor the health of individual VMware virtual machines.  If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.

Download a free trial of SolarWinds’ Network Performance Monitor

Troubleshooting E-mail Address Policies

If your Windows Exchange 2010 E-mail Address Policies works first time, then you are a genius.  However, if at first nothing seems to happen, here are tips to help you resolve the problem.

Note 1:  If no email addresses seem to be created, then navigate to the E-mail Address Policies folder, right-click and Apply this policy now..

Note 2:  Did you notice how the ‘Apply this policy now… is ‘greyed out’?  Hmmm.. what could be the reason?  The answer is that Guy did not choose any settings for the filter.  So, do not make this mistake, go back to your policies and select the Filter button, next click Add.  Did you see an LDAP query appear in the window?  Then great, your E-mail Address Policies has every chance of working – provided that you click on Apply this policy now.

Naturally, if you are even a minor expert in LDAP, then you can fine-tune the policy so that only a sub-set of users receive the policy, for example all users in the PlanB department.

Original Sequence

Policy 1) %[email protected]
Policy 2) %[email protected] and %g@PlanBdomain
Policy 3) %s@somewherelse

Solution: Move Policy 2) Priority above Policy 1).  See Move Up in the diagram above.  The result of promoting Policy 2) is that all those who are in department = PlanB now get Policy 2).  If you are wondering about the rest of the users who do not match Policy 2), they will all match Policy 1) so all just receive the one email address.

Modified Sequence

Policy 2) %[email protected] and %g@PlanBdomain
Policy 1) %[email protected]
Policy 3) %s@somewherelse

Trap: Another variation of this problem is that users receive the secondary address but no primary email address.  An example of this variation is Policy 3), where only one email address is configured instead of two.  To experience this problem, Policy 3) would have to be moved up to the top of the list.

Summary of E-mail Address Policies in Exchange 2010

Time spent creating Exchange Sever 2010’s E-mail Address Policies will repay with interest.  When your users need a secondary email address, then launch the EMC to navigate to the Hub Transport container and the wizard will assist you creating the policy.  Alternatively, use PowerShell and New-EmailAddressPolicy.

If you like this page then please share it with your friends

 


See more Microsoft Exchange Server 2010 topics:

Exchange 2010  • SMTP Auth Login  • Address Policies in Exchange 2010  • New-SystemMessage

Monitoring Exchange  • Anti-spam for Exchange  • GFI MailEssentials  • Computer Performance Home

Anti-spam for Exchange Server  • Solarwinds Free Exchange Monitor  • Exchange 2010 Transition