Mail Enabled Public Folder Issue.

In the world of legacy Exchange Servers their is a silent killer, Public Folders. This becomes more and more true as you perform migrations, and decommissions in your environment. I know there are other posts, blogs, and articles on this subject, believe me I’ve done my research….. In this blog I will go over a real world issue I encountered with Mail Enabled PFs.

A great start to this should be the review of Paul Sterley blog Here, as well Bill Longs blog Here. Now these are great articles but there missing 1 detail when it comes to Mail Enabled PFs and that’s the HomeMDB on the object.

The Issue?

When you migrate PFs to Exchange 2010 from Exchange 2003 and decommission the Exchange 2003 server without uninstalling Exchange. Once you remove the server from ADSI in your Configuration > Services > Microsoft Exchange > Your Org > Administrative Group > First Administrative Group > Servers > ServerName you start noticing the following errors.

MapiExceptionNotFound during content replication

“` Error: Cannot start content replication against public folder ‘\SomeFolder’ on public folder database ‘PFDB1’.
MapiExceptionNotFound: StartContentReplication failed. (hr=0x8004010f, ec=-2147221233) Diagnostic context: Lid: 1494 —- Remote Context Beg —- Lid: 19149 Error: 0x0 Lid: 25805 Error: 0x0 Lid: 11752 StoreEc: 0x8004010F Lid: 25260
Lid: 19149 Error: 0x0 Lid: 25805 Error: 0x0 Lid: 11752 StoreEc: 0x8004010F Lid: 25260
Lid: 19149 Error: 0x0 Lid: 3010 StoreEc: 0x8004010F Lid: 3010 StoreEc: 0x8004010F Lid: 3650 StoreEc: 0x8004010F Lid: 3010 StoreEc: 0x8004010F Lid: 3010 StoreEc: 0x8004010F Lid: 3650 StoreEc: 0x8004010F Lid: 2492 StoreEc: 0x8004010F Lid: 2108 StoreEc: 0x8004010F Lid: 18128 StoreEc: 0x8004010F Lid: 18536 StoreEc: 0x8004010F Lid: 18544 StoreEc: 0x8004010F Lid: 18560 StoreEc: 0x8004010F Lid: 18740 StoreEc: 0x8004010F Lid: 1267 StoreEc: 0x8004010F Lid: 33819 StoreEc: 0x8004010F Lid: 27225 StoreEc: 0x8004010F Lid: 1750 —- Remote Context End —- Lid: 26322 StoreEc: 0x8004010F “
Or

You get an NDR from a Public Folder with 

#550 5.2.0 RESOLVER.PF.Invalid; misconfigured public folder mailbox ##

The Solution?

Whats most likely happened is the PF databases have lost their msExchOwningPFTree attribute from their properties, and the Mail Enabled PFs lost their homeMDB attribute as well. Now to fix this issue we will have to do two things, first repopulate the msExchOwningPFTree, and second repopulate the homeMDB.

Ensure the “CN=Public Folder” is present

Navigate to Configuration > Services > Microsoft Exchange > Your Org > Administrative Group > First Administrative Group > Folder Hierarchies. If this folder is present and you still have Exchange 2003 servers do NOT remove it, or CN=Servers….. Lets click on “Folder Hierarchies” and right click CN=Public Folders in the right pane and select properties.  First Click msExchangeOwningPFTree and verify only active present servers are in the list. If you have decommissioned server present you will need to repopulate the CN=Public Folder object.

Repopulating CN=Public Folder if missing or incorrect

Right click Folder Hierarchies and select New Object Select msExchPFTree as class, click Next Enter the following as value: Public Folders, click Next Click on More Attributes button, drop down the “select a property to view” list, select msExchPFTreeType and set the attribute to 1 (it should populate into the value field). Click OK, Finish
Now reopen the properties for CN=Public Folder and verify that msExchangeOwningPFTree has the correct servers listed.
If msExchangeOwningPFTree is correct we want to copy the distinguishedName to clip board or notepad.
Adding “CN=Public Folder” distinguishedName to the msExchangeOwningPFtree value 
Navigate to Configuration > Services > Microsoft Exchange > Your Org > Administrative Group > First Administrative Group > Servers > Your Server > InformationStore > Your Public Folder Database Location right click and select properties and locate msExchangeOwningPFTree. Add the distinguishedName of the CN=Public Folder as the value then click ok, apply, and ok. Repeat this for all your Public Folder database in Exchange 2003.
For Exchange 2010 navigate to Configuration > Services > Microsoft Exchange > Your Org > Administrative Group > Exchange  Administrative Group > Databases > Your PF Database right click and select poperties and modify the value for msExchangeOwningPFTree with the distinguishedName of the CN=Public Folder.
Fixing Mail Enabled Public Folders Mail Routing…
The second error you may not get until your users start trying to email their public folders. Its a simple fix and depending on the size of your environment could take a while.
Use the script below to resolve. This script will add back in the homeMDB to your mail enabled PFs. Remember to modify $container and $pfTreeDN with your correct environment values.
Fixing Public Folder Directory Objects That Aren’t Linked To The Hierarchy – Bill Long’s Exchange Blog – Site Home – TechNet Blogs

# Link-PFProxies.ps1
#
# Change these two values to match your environment.
# $container should point to the MESO container you want to run against.
# $pfTreeDN should contain the distinguishedName of the public folder hierarchy object.

$container = [ADSI](“LDAP://CN=Microsoft Exchange System Objects,DC=contoso,DC=com”)
$pfTreeDN = “CN=Public Folders,CN=Folder Hierarchies,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com”

#################################################

$filter = “(!(homemdB=*))”
$propertyList = @(“distinguishedName”)
$scope = [System.DirectoryServices.SearchScope]::OneLevel

$finder = new-object System.DirectoryServices.DirectorySearcher($container, $filter, $propertyList, $scope)
$finder.PageSize = 100
$results = $finder.FindAll()

(“Found ” + $results.Count + ” folder proxies with no homeMDB…”)
foreach ($result in $results)
{
(“Fixing object: ” + $result.Path)
$entry = $result.GetDirectoryEntry()
$entry.Put(“homeMDB”, $pfTreeDN)
$entry.SetInfo()
}

Once the script finishes your mail enabled PFs will be fixed.

 

I hope you find this article helpful.