Fixed - summary below
Problem Description: After upgrading to Exchange 2013, legacy email address policies (2003) exist and cannot be edited.
The Exchange System Manager in Exchange 2003 is the only way to edit these objects unless they are upgraded to an Exchange Server 2007 objects.
The Default EAP (which cannot be deleted) was also un-editable and was applying incorrect/obsolete email information.
Several other defunct EAPs were able to be deleted. The concern with the Default EAP was that if applied to existing users, it would create serious problems and interrupt mail flow.
Finally, it should be noted that this is a hybrid environment.
Customer has a hybrid on-prem Exchange 2013 server with remote mailboxes hosted on Office 365.
Solution:
1. Exclude all mailboxes from automatic update of their recipient policy settings - including Email Address Policies
$mbx = Get-Mailbox
$m = foreach ($m in $mbx) { Set-Mailbox -Identity $m.Identity -EmailAddressPolicyEnabled $false }
$rmbx = Get-RemoteMailbox
$r = foreach ($r in $rmbx) { Set-RemoteMailbox -Identity $m.Identity -EmailAddressPolicyEnabled $false }
2. Upgrade the legacy Default EAP
Set-EmailAddressPolicy "Default Policy" -IncludedRecipients AllRecipients
3. Update Default EAP with correct settings
Update-EmailAddressPolicy -Identity "Default Policy" -EnabledEmailAddressTemplates 'SMTP:%m@mydomain.com' -IncludedRecipients AllRecipients
4. Create additional EAP for Office365
Set-EmailAddressPolicy Office365 -EnabledEmailAddressTemplates SMTP:%m@mycompany.mail.onmicrosoft.com -RecipientFilter { (RecipientType -eq 'UserMailbox') }
One concern: the "Office365" EAP is applied to 'UserMailBox'. How does that include 'RemoteUserMailbox' ?
Perhaps a better alternative is this:
Set-EmailAddressPolicy Office365 -EnabledEmailAddressTemplates SMTP:%m@mycompany.mail.onmicrosoft.com -IncludedRecipients AllRecipients ??
References
Email address and address book cmdlets
https://technet.microsoft.com/en-us/library/jj218649(v=exchg.150).aspx
Exchange Management Shell cmdlet input and output types
https://msdn.microsoft.com/library/ff326162(v=exchg.150).aspx
http://technet.microsoft.com/en-us/library/cc164375.aspx
In Microsoft Exchange Server 2003 and earlier versions, LDAP filtering syntax is used to create custom address lists, global address lists (GALs), e-mail address policies, and distribution groups. In Exchange Server 2010 and Exchange Server 2007, the OPATH
filtering syntax replaces the LDAP filtering syntax. Using the OPATH filtering syntax allows you to create filters directly in Exchange Management Shell commands by using the -RecipientFilter parameter.
http://blogs.technet.com/b/exchange/archive/2007/03/12/3401538.aspx
After installing Exchange 2007 into your existing Exchange organization, the address lists and recipient policies must have OPATH filters specified in order to administer them from the Exchange 2007 tools.
https://technet.microsoft.com/en-us/library/cc164351(v=exchg.80).aspx
In Microsoft Exchange Server 2003 and earlier versions, Lightweight Directory Access Protocol (LDAP) filtering syntax is used when customizing the default e-mail address policy. However, in Exchange Server 2007, the OPATH filtering syntax replaces the LDAP
filtering syntax.
-
Proposed as answer by
jott220
14 hours 28 minutes ago