Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-01-20

You can modify message size limits to increase or decrease the size of e-mail messages that clients may send or receive.

To configure message size limits, you modify the following parameters on the Send and Receive connectors on the Hub Transport servers:

To view the Send and Receive limits for your Exchange organization, use the following cmdlet:

Get-TransportConfig |fl max*size

To view the Send and Receive limits for individual mailboxes, use the following cmdlets:

Get-Mailbox –id sender |fl max*size

Get-Mailbox –id recipient |fl max*size

To determine whether the sender and recipient have enough room left in their mailboxes, you can run the following Exchange Management Shell cmdlets:

Get-MailboxStatistics –id sender | fl StorageLimitStatus,TotalItemSize

Get-Mailbox sender | fl prohibit*quota

Get-Mailbox sender | foreach {Get-MailboxDatabase –id $_.mailboxdatabase | fl prohibit*quota}

Get-MailboxStatistics –id recipient | fl StorageLimitStatus,TotalItemSize

Get-Mailbox recipient | fl prohibit*quota

Get-Mailbox recipient| foreach {Get-MailboxDatabase –id $_.mailboxdatabase | fl prohibit*quota}

Additionally, you must configure both of the following parameters in the Exchange Web Services (EWS) Web.config file for clients that use Exchange Web Services such as Microsoft Entourage 2008 for Mac, Web Services Edition to submit e-mail messages to Exchange:

The size of a message is determined by the size of the message body plus the size of any attached files. For Microsoft Exchange Server 2010 Service Pack 1 (SP1), the default message size restrictions are set to 35 million bytes. This accommodates approximately 25 MB of Base64-encoded data. For Microsoft Exchange Server 2010, the default message size restrictions are set to 13.6 million bytes. This accommodates approximately 10 MB of Base64-encoded data.
After you set the message size properties for Exchange Web Services, you must stop and then start the Default Web site.

For information about other management tasks that are related to setting up message size limits, see Understanding Message Size Limits.

Use a text editor to modify the Web.config file

To modify the Web.config file, follow these steps:

  1. Start Windows Explorer, and then locate the Web.config file. By default, this file is located in the following directory:

    %ProgramFiles%\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews

  2. Create a copy of the file as a backup.

  3. Open the Web.config file by using a text editor, such as Notepad.

  4. Search for the maxAllowedContentLength entry. By default, this entry appears as follows in Microsoft Exchange Server 2010 RTM:

    <requestLimits maxAllowedContentLength=”13600000” />

  5. Change the value for maxAllowedContentLength to accommodate the message size that you want to allow. Because message attachments are Base64-encoded before they are transferred, the value must be set high enough to accommodate the desired message size together with the encoding overhead.

    For example, to allow messages of approximately 20 MB, perform the following calculation:

    20971520 bytes * 4/3 for Base64 encoding = 27962027 (rounded up)

    In this formula, the fraction 4/3 represents a message that is approximately 33 percent larger than the original. However, message size increase may be much larger, depending on the type of attachment that is sent, the attachment size, whether the attachment is already compressed, and the messaging client from which the message is sent. In some cases, you may experience message size increases of 100 percent after encoding (that is, messages that are twice the size of the original messages).
  6. Search for maxReceivedMessageSize. This entry is listed after the EWSServiceBehavior entries. By default, this entry appears as follows in Exchange 2010 RTM:

    <httpsTransport maxReceivedMessageSize=”13600000” authenticationScheme=”Anonymous” maxBufferSize=”81920” transferMode=”Streamed” />

  7. Change the value for maxReceivedMessageSize to the same value as for maxAllowedContentLength to accommodate the desired message size together with the base64 encoding overhead.

  8. Save the changes to the Web.config file, and then exit the text editor.

  9. Stop and then start the default Web site for the settings to take effect.

    You must configure at least the same message size limits on the appropriate transport servers to support the increased message size. For more information, see Understanding Message Size Limits.