One request I’ve seen a lot over the years is to be able to customize the quota messages generated by the information store process. Customers have offered any number of reasons on why they want to do this - some for legal reasons can’t use PSTs, and some just want to give more helpful instructions to their users. To understand the problems with this, you have to understand how the Store process creates these messages.
Each night, during quota maintenance, the Information store kicks off a background task that walks through the mailbox table, checking the mailbox size against a user’s configured limits. A user falls into one of four categories by default:
The store creates a message (from the system attendant), and formats it using a string retrieved from MDBSZ.DLL (a compiled binary that is effectively part of the store). This string is formatted with a few predefined values, and the message is delivered via a system delivery path into the user’s inbox as a “quota message”. The key part here is that the source of data is a string resource in a compiled binary. MCS (Microsoft Consulting Services) will contract to update MDBSZ.DLL with a new string, but that has to be maintained, as each new Hotfix and service pack (and version) of Exchange will update MDBSZ.DLL.
For Exchange 2000 post SP3 & Exchange 2003 SP1, we have taken a DCR (design change request) to enable Administrators to create their own custom quota messages. Note that this does not mean editing the existing messages, or invoking that logic at all. The DCR is really three bits of functionality:
So, now a custom app could be written that walked the mailbox table, looking at the status, using the quota information to format a custom message, and the over ride registry key to be able to save it into the inbox. This isn’t terribly complex code, but it didn’t exist. As part of testing this change, we needed an app that would do exactly that, so I wrote one. It began as a simple command line app (a derivative of the same tool I’ve modified to report mailbox sizes, repair OOFs, modify free/busy and other such things). I converted it to a service, added event logging, diagnostic logging, a RPC interface and a MMC extension to trigger it, and perfmon counters. The event logging and diagnostic code is inherited from a service I wrote for Exchange 5.5 that archived journaled email messages to SQL server for powerful searching. Custom messages can support inserts (%1, %2, %3, ect) for mailbox size, warning limit, send limit, send receive limit, and the difference between each.
You can download the service from http://workspaces.gotdotnet.com/quotamsgsvc. The source is available as well under a slightly modified Microsoft Shared Source License. The code as is worked at the last time I tested it, but my tests since converting to IExchangeManageStore4 (for supporting more than 64,000 mailboxes per server) have been limited.
Why release the source?
There’s a number of things that COULD be done, but I just don’t have time. While this has been a pet project of mine for a while, there’s no way this will satisfy what each and every user wants.
Limitations:
NOTE: The above note about lack of PSS support is no longer true. Microsoft Exchange Server Quota Message Service is now released on the official Exchange 2003 Tools web site and is now fully supported.
So, the workspace is open for business, the project and code are available for download.
Enjoy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.