Upgrading Legacy Address Lists and Email Address Policies

With the introduction of Exchange 2007 came many new features and improvements that help to improve productivity and management: multiple server roles, a 64 bit architecture, built-in high availabilty features (LCR, CCR, SCR and SCC) and Messaging Records Management just to name a few.  Another change you will notice is with Email Address Policies (EAPs) and Address Lists.

Prior to Exchange 2007, address lists used the LDAP syntax for filtering. When migrating to Exchange 2007 or 2010, the address lists and recipient policies must be updated to use OPATH filters in order to manage them from the Exchange Management Console (EMC).  This article will outline the steps I used to update the EAPs and Address Lists legacy filters on an Exchange 2010 server.  These steps will also work on Exchange 2007.

To start off, the following command must be executed in the Exchange Management Shell to determine which policies are using legacy filters:

Get-EmailAddressPolicy | Format-List Name,*RecipientFilter*,ExchangeVersion

address list

As you can see in the above output, all of the EAP’s with legacy filters are indicated by the “Legacy” value associated with the RecipientFilterType property.  Also, the Exchange Version of “0.0 (6.5.6500.0)” is another indicator.

The Default Policy can be upgraded with the following command. Custom EAP’s and Address Lists will have to be converted manually, which I will explain later in this article:

Set-EmailAddressPolicy “Default Policy” -IncludedRecipients AllRecipients

Upgrading Default Address Lists

Now that we have updated the Default Policy, let’s go ahead and update the Default Address lists.  The following Default Address Lists are present:

  • Default Global Address List
  • All Users
  • All Rooms (In Exchange 2007/2010, this list doesn’t need upgrading)
  • All Contacts
  • All Groups
  • Public Folders

Run the following command to verify the existence of legacy Address Lists:

Get-AddressList | Format-List Name,*RecipientFilter*,ExchangeVersion

address list 2

As we saw with the Default Policy, the values of the RecipientFiltertype and Exchange version properties indicate the presence of legacy filters on the Default Address lists.

Next, run the following commands to update the Default Address Lists to use OPATH filters:

  • All users – Set-AddressList “All Users” -IncludedRecipients MailboxUsers
  • All Groups – Set-AddressList “All Groups” -IncludedRecipients MailGroups
  • All Contacts – Set-AddressList “All Contacts” -IncludedRecipients MailContacts
  • Public Folders – Set-AddressList “Public Folders” -RecipientFilter { RecipientType -eq ‘PublicFolder’ }
  • Default GlobalAddress List – Set-GlobalAddressList “Default Global Address List” -RecipientFilter {(Alias -ne $null -and (ObjectClass -eq ‘user’ -or ObjectClass -eq ‘contact’ -or ObjectClass -eq ‘msExchSystemMailbox’ -or ObjectClass -eq ‘msExchDynamicDistributionList’ -or ObjectClass -eq ‘group’ -or ObjectClass -eq ‘publicFolder’))}

Updating Custom Email Address Policy and Address List Filters

Now that we are done with the Default EAP and Address Lists, let’s move on to the custom policies and lists.  These can be updated manually or by using a script designed by Microsoft.  Once downloaded to the server, open the script in Powershell and several syntax examples will be provided.  The following command should be run first to get the current Legacy filter and suggested OPATH filter with the output redirected to a text file. This will NOT perform a conversion, but only save the old filters in case an issue occurs:

Get-AddressList | WHERE { $_.RecipientFilterType -eq ‘Legacy’ } | foreach { $_.Name + [char]9 + $_.LdapRecipientFilter +[char]9 + (.\ConvertFrom-LdapFilter $_.LdapRecipientFilter) } > C:\suggestedfilters.txt

Next, there are two options to update the Address Lists: one at a time or all at once.  The following command will convert one Address List:

Set-AddressList “My Address List” -RecipientFilter ( .\ConvertFrom-LdapFilter (Get-AddressList “My Address List”).LdapRecipientFilter )

To update all Address Lists and EAP’s at once run the following two commands:

Get-AddressList | WHERE { $_.RecipientFilterType -eq ‘Legacy’ } | foreach { Set-AddressList $_.Name -RecipientFilter (.\ConvertFrom-LdapFilter $_.LdapRecipientFilter) -ForceUpgrade }

Get-EmailAddressPolicy | WHERE { $_.RecipientFilterType -eq ‘Legacy’ } | foreach { Set-EmailAddressPolicy $_.Name -RecipientFilter (.\ConvertFrom-LdapFilter $_.LdapRecipientFilter) -ForceUpgrade }

As a reference, Evan Dodds has a blog post on The Exchange Team Blog site that discusses this process.  However you decide to upgrade the custom Email Address Policies and Address Lists is your choice, whether it’s manually or using the script.  I prefer doing them one at a time. If something goes wrong, only one is affected.  Once these steps are completed, it will be possible to modify the Address Lists with the correct user information in the EMC.

One thought on “Upgrading Legacy Address Lists and Email Address Policies

  1. I could honestly kiss you. I’ve been battling this (and a related issue in Outlook 2016 caused by this) for 6mths. I stumbled over your blog somehow and this has been my issue. It’s now fixed and I’m damn thrilled. Thanks for your time


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s