Friday, August 5, 2011

Modifying an Exchange 2010 E-Mail Address Policy throws the error: “You can't specify the recipient container because legacy servers are detected.”

Problem

You’re in the process of transitioning from Exchange 2003 to 2010 and you have just upgraded your Exchange 2003 E-Mail Address Policy for Exchange Server 2010.  Now that they’re upgraded, you would like to make some changes to it so you go through the wizard for modifying the policy but once you attempt to apply the policy, you receive the following error:

New student.contoso.com
Failed

Error:
You can't specify the recipient container because legacy servers are detected.

Exchange Management Shell command attempted:
new-EmailAddressPolicy -Name 'student.contoso.com' -RecipientContainer 'contoso.local.com/School' -IncludedRecipients 'MailboxUsers' -ConditionalCompany 'student.contoso.com' -Priority 'Lowest' -EnabledEmailAddressTemplates 'smtp:%m@contoso.local.com','SMTP:%m@student.contoso.com'

Elapsed Time: 00:00:00


Apply student.contoso.com
Cancelled

image

Solution

The reason why Exchange Server 2010 is throwing this error is because you used the following feature:

Select the recipient container where you want to apply the filter:

image

Exchange Server 2003 actually doesn’t support this feature and since you still have your Exchange 2003 server in the organization and therefore operating in a coexistence topology, Exchange Server 2010 will not allow you to create a policy that uses this feature that does not exist in Exchange 2003.

To get around this, all you need to do is leave the Select the recipient container where you want to apply the filter: field blank if you’re using the Exchange Management Console wizard or use the PowerShell cmdlet to create a new one with the following syntax:

new-EmailAddressPolicy –Name ‘domain.com (i.e. contoso.com)’ -IncludedRecipients ‘AllRecipients’ –ConditionalCompany ‘Attribute (i.e. Accounting)’ -Priority ‘Lowest’ -EnabledEmailAddressTemplates ‘SMTP:%g.%s@domain.com’,'smtp:%g.%s@secondarydomain.com

Here’s an example of the cmdlet:

new-EmailAddressPolicy -Name 'student.contoso.com' -IncludedRecipients 'MailboxUsers' -ConditionalCompany 'student.contoso.com' -Priority 'Lowest' -EnabledEmailAddressTemplates 'smtp:%m@contoso.local','SMTP:%m@student.contoso.com'

By leaving the Select the recipient container where you want to apply the filter: blank, the policy should not successfully update.

image

Creating a new E-Mail Address Policy with the cmdlet would look something like this:

[PS] C:\Windows\system32>new-EmailAddressPolicy -Name 'student.contoso.com' -IncludedRecipients 'MailboxUsers' -ConditionalCompany 'student.contoso.com' -Priority 'Lowest' -EnabledEmailAddressTemplates 'smtp:%m@contoso.local','SMTP:%m@student.contoso.com'
Creating a new session for implicit remoting of "New-EmailAddressPolicy" command...

Name                                    Priority                                RecipientFilter
----                                    --------                                ---------------
student.contoso.com                       2                                       ((Company -eq 'student.contoso.com') -...


[PS] C:\Windows\system32>

image

3 comments:

Anonymous said...

This is only correct if you have a single Email Policy! Carefull.

Anonymous said...

So how do you get around it if you want to create a policy for a select group of users?? We have people in our Australia office that require different domain aliases. If I remove that container, how do I create the policy??

Anonymous said...

Still doesn't solve the problem of limiting the scope of a policy to a particular OU.