Thursday 29 January 2009

Exchange 2007 message size limits

Setting message size limits on your Exchange platform is a fairly obvious, although sometimes controversial best practice. The primary reasons for doing this include managing mailbox growth rates, network utilisation and also preventing potential Denial of Service attacks.

Once you have sorted out the politics of setting message size limits and how big this limit should be, how do you actually implement on Exchange 2007? Of course the first place I would set it is in the Organization Configuration > Hub Transport > Global Settings > Transport Settings > Transport Limits or I would use the Set-TransportConfig cmdlet.

Easy, eh? Well no, that is only a small part of the whole story. There is a whole bunch of other stuff you need to consider.

What: Do you want to limit the size of the Message, the Message Header, attachments?
Scope: You have just set a message size limit at the Organization level. But you can set it all these levels;
1. Organization / Global
2. Connectors ( including Send, Receive, Site Link and Routing Group connectors)
3. Servers
4. User objects (including mailbox, contact, Distribution Group and contact level).
Precedence or Effective limits: What if you set different attachment size limits on different scopes. Which one applies? The smallest size? The largest size? The one set last?

What

I think for most Exchange Organizations they would not need the granularity of exactly what part of a message they want to apply to size limits to. For the main reasons I listed at the top, accepting the Exchange 2007 SP1 defaults and then only considering what to change the maximum message size to (including attachments and headers) would be sufficient.

Scope

First thing to clarify is what is the difference between Organization level and Global level? In a nutshell, the Organization size limits apply to all Hub Transport servers in the Exchange Organization. The Global size limits applies to all Exchange 2007 Hub Transport servers and all Exchange 2003 servers in an Exchange Organization. In Exchange 2007 SP1 these limits cannot conflict as the Organization limits will be copied to the matching Global limits. (This was not the case with Exchange 2007 RTM, but there is no point going into that as no one in their right mind would still be running Exchange 2007 RTM - IMHO. For the rest of this post I am not going to include Exchange 2007 RTM info). To set message size limits on the Edge Transport server you will need to use the server scope in the EMC or the Set-TransportServer cmdlet.
The other scope levels are fairly self explanatory. With Exchange 2007 SP1, anywhere Microsoft set a default maximum message size it is 10MB. It would take me too long to list all the places this limit has been set here.

Precedence

Now this is important. If I want to set Organization message size limits, can I create exceptions to the rule? If I set different size limits what is the Effective message size limit for a particular mailbox?
Unfortunately figuring out exactly what take precedence or what effective message size limits are, is not entirely obvious on the main Technet article describing setting message size limits in Exchange 2007. Even the one example seems to be missing words.

A good rule of thumb is if the user object (any one of the list above) message size limit is higher than the Organization message size Transport limits, then an email to the higher size limit can be sent internally. Unfortunately this precedence does not occur for any email being sent or received from outside the Exchange Organization.

Gotcha....
A major “gotcha” to watch out for is that the initial size of a message may get bloated by content conversion by a decent percentage. An email that begins as 10MB, could end being 13MB after content conversion and therefore violate message size limits. If you are troubleshooting message delivery failures, a good place to look is the Message Tracking logs. (Enabled by default in Exchange 2007)

No comments: