Managing message size limits in Exchange 2007 using powershell
Posted by shauncroucher on October 11, 2009
The lists I have given below show the most common message size limits, however there are some attachment and header limits that the commands may not show you, so follow the links at the bottom of this article for further informationif you still have problems.
NOTE: Always include the qualifier ‘MB’ when using the management shell to specify message size restrictions.
NOTE: http://technet.microsoft.com/en-us/library/bb124345.aspx is the MASTER reference article for size restrictions for Exchange 2007 and most of the information below is plucked from there. The idea of this article is to extract and simplify some of the commands to get and set the settings.
Global Settings
Scope: RTM Only. Transport setting will change this automatically in SP1
Note: If the values found here and the values found using ‘get-transportconfig | fl M*ze’, the lowest value takes precedence.
Global Settings stored in Active Directory (access using ADSIEdit)
Configuration –> Services –> Microsoft Exchange –> [DOMAINNAME] –> Global Settings –> right client
Message Delivery –>
Check the settings below. They are in KB
msExchRecipLimit (default 5000)
submissionContLength (default 10240) (MaxSendSize)
delivContLength (default 10240) (MaxReceiveSize)
Transport Setting
Scope: Organisational limits for ALL EX2003 / EX2007 servers in the entire organisation.
To show current settings:
get-transportconfig | fl M*ze
To Alter:
Set-TransportConfig -MaxRecipientEnvelopeLimit -MaxReceiveSize MB -MaxSendSize MB
Also check there are no Transport Rules to check the Attachment size of messages.
Connector Limits
Scope: Will affect all messages using the specified connector. Either Send,Receive or Foreign.
To retrieve current settings:
get-ReceiveConnector | ft Id*,M*ze
Get-SendConnector | ft Id*, M*ze
Get-ForeignConnector | ft Id*, M*ze
To Alter:
Set-ReceiveConnector “” -MaxMessageSize MB
Set-SendConnector “” -MaxMessageSize MB
Set-ForeignConnector “” -MaxMessageSize MB
‘Server Specific’ Limits and Outlook Web Access (OWA) limits
Scope: Hub/Edge servers with Transport Rule AND Client Access Servers for the OWA restrictions.
Check there are no transport rules that have ‘server specific’ attachment size over restrictions
CAS servers provide OWA for users to access mail using a web browser. The underlying engine is ASP.NET.
ASP.NET uses the maxRequestLength setting to determine the maximum amount of data that the Web browser can submit to the Client Access server
The setting can be found in the web.config file.
See http://technet.microsoft.com/en-us/library/aa996835.aspx for instructions on changes needed here.
‘Multiple Sites’ and ‘E2000 \ E2003 Co-Existence’ Settings
Scope: Will affect messages using the site links and the routing group connectors for delivery. The settings themselves
DO NOT affect least-cost routing decisions.
* Note that Exchange 2007 RTM does not support site link or routing group connector size limits and routing loops
may occur if they are set. SP1 and above does support size limits though.
Active Directory site links:
Get-AdSiteLink | ft Name,M*ze
Set-AdSiteLink “Site link name” -MaxMessageSize MB
Routing Group connectors:
Get-RoutingGroupConnector | ft Name,M*ze
Set-RoutingGroupConnector “Name of routing group connector” -MaxMessageSize MB
‘Users and Groups’ Settings
—————————
Scope: All the above is for Transport level restrictions, but you need to check the MaxMessageSize setting for the user mailbox/contact and
also the groups they may belong to.
Get-Mailbox “name of mailbox user” | fl M*ze
Get-MailUser “name of user” | fl M*ze
Get-MailContact “name of contact” | fl M*ze
Get-DynamicDistributionGroup “name of dynamic dist” | fl M*ze
Get-DistributionGroup “name of dist” | fl M*ze
Get-MailPublicFolder “name of public folder” | fl M*ze
Manually SET a limit (if ‘unlimited’)
Some exchange administrators have reported that the limits indicate ‘unlimited’ in one or more of these location, and once they change to a value (such as 100MB), the problems disappear. If you are unsure, I would recommend setting a limit rather than leaving as ‘unlimited’.
Shaun
References:
http://www.msexchange.org/articles-tutorials/exchange-server-2007/management-administration/exchange-2007-message-size-limits.html - Exchange 2007 Message Size Limits
http://technet.microsoft.com/en-us/library/bb124345.aspx - Managing Message Size Limits
http://technet.microsoft.com/en-us/library/bb310771.aspx - How to Modify Exchange 2003 Global Message Size Limits in Exchange 2007 RTM
http://technet.microsoft.com/en-us/library/bb125223.aspx - Message Routing in a Coexistence Environment
http://technet.microsoft.com/en-us/library/bb738125.aspx - How to Configure Message Size Limits for Internal Routing
http://technet.microsoft.com/en-us/library/aa996835.aspx - How to Manage Maximum Message Size in Outlook Web Access
Boris said
Thank you for very good article, but I have a customer with one server (Exchange 2007 15 mailboxes) configuration and whatever I do the Exchange cannot receive more then 10 MB attachments. Any thoughts?
shauncroucher said
Hi Boris,
Thanks for visiting my blog,
Please check the MX records for your domain and make sure they are pointing directly to your server, there may be an intermediary step where mail is interrogated before arriving at your server. Do you run any third party antispam or antivirus software on the server that may also have an option to restrict message sizes?
Shaun
Boris said
Shaun,
thank you for prompt response, but I think this answer from Exchange (I am sending 24 MB file from gmail account) – “The error that the other server returned was: 552 552 5.3.4 Message size exceeds fixed maximum message size (state 18).”
Any thoughts?
shauncroucher said
Have you gone over the article exactly as described, including connectors, recipient receive limits, any old legacy Exchange 2003 limits that may be in place, and can you run from shell and double check all settings and see that all limits are way higher than 24MB? Also, unlimited does not always work, so try setting a limit to 50MB or something like that.
Gmail only allow up to 25MB so you will hit a problem using this for more than 25MB. Most servers will not allow you to send beyond 10MB or 20MB.
Shaun
Michael Damico said
I have tried the following and I still cannot get this to work.
We are using a forefront filter, but nothing in there is set for size limits, only attachment limits. I have been trying to send a 12mb powerpoint and cannot get it to send. I have changed every limit to 50mb and still cannot get this to work.
I will post information you need of me to help diagnose this problem, it has been a headache.
Thanks,
Greg said
We’re having the same problem. The size is set to 2 GB, and still same error with an 8 MB file:
552 552 5.3.4 Message size exceeds fixed maximum message size (state 18).
Checking the server with the command “get-receiveconnector -identity “Default MAILSERVER” List” reveals it’s correct:
MaxMessageSize : 2097151KB
Anyone solve this one? Thanks!
shauncroucher said
Thanks for visiting my blog,
Can you check the user specific receive limits and then connector limits?
Shaun
Greg said
Figured it out. Our Edge server wasn’t syncing (big surprise – thing fails constantly), so I recreated the sync certificate and my limits replicated over. Thanks, though!