The following has come up in various guises in internal questions and so I thought it was about time this was given to a wider audience.
I’ve just sent an email to a public folder – how did it actually get there, given I have multiple replicas of the folder...?
Delivering an email to a mailbox is relatively simple. A mailbox is located on a specific mailbox store, on a specific server. Every mailbox has an entry in the active directory, which the transport code can use to work out where the mailbox is and how to get there.
The problem with delivering to a public folder is that it may exist on multiple servers. There’s no “home server” for a public folder. The replica list of a folder (the property that governs where the folder’s contents are physically stashed), is actually not in the Active Directory at all – it’s a property found only in the public store database. How on earth does the transport code know which public folder store to deliver the email to?
It uses a “two stage process” (insert funny finger wiggling quotes if you desire).
Stage 1 is where transport looks for a public folder store which holds the hierarchy that the folder belongs to and forwards the message to that store. This store can then tell transport where an actual replica exists.
Stage 2 is when the message is redirected to a store that actually holds a replica of the folder.
Once the message has been successfully placed in a folder, it will replicate to all other replicas of the folder by normal public folder replication.
Stage 1
Stage 1 occurs when Exchange’s transport mechanism (SMTP and the categorizer) first gets hold of the message – either from an external source (in which case this would be your inbound Exchange gateway server), or an internal source.
How, what and where are public folder directory entries? Public folder directory entries exist purely to allow you to email a public folder, they have nothing to do with replication, posting to or reading from a public folder. Only “mail enabled” public folders (right click on public folder in Exchange System Manager and choose mail enable) have directory entries – hence only mail enabled public folders can have email delivered to them. Public folder directory entries exist in the “Microsoft Exchange System Objects” container in the Active Directory. Public folder directory entries have an objectCategory of “ms-Exch-Public-Folder” and an objectClass of “publicFolder”.
What is a PF hierarchy? By default an Exchange organization contains only one hierarchy – the “Public Folders” hierarchy. You can see this hierarchy when you look at your list of public folder through Outlook or OWA. Sometimes this is referred to as the MAPI hierarchy as it is available to MAPI clients (Outlook). Additional hierarchies can be created, and new public stores can be created and assigned to hold data for these hierarchies. They tend to be used for specialized applications or data storage, not designed to be access directly by clients.
This list always has the most recently added public folder stores to the organization at the top (and as a public folder store is created when a new server is installed, normally this means the most recently installed servers will be at the top of the list). What could happen is we pick a server that has just been added to the org and may not have the full public folder hierarchy yet (and hence not know what to do with the message). To prevent this in Exchange 2003, we don’t select any stores younger than two days, unless there is no alternative.
Stage 2
Stage 2 now occurs. We’ve delivered the message to a store that at least knows where a replica exists – what next?
Hopefully this explains why email messages to public folders may travel in a certain direction and explain why they are delivered (or queued for delivery) to a particular server. Finally in case all of the above made absolutely no sense whatsoever, here are a few quick examples that show this in action:
Hope you found this helpful J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.