Exchange 2013 Email Size Limits for Mobile Devices
When people send large email attachments from their iphone they get a false error that their mailbox is full. I finally figured out the true error – they were sending messages larger than 10MB. If you want to raise the limit, here is how.
Pasted for my own use:
In Microsoft Exchange Server 2013, there are several different message size limits that apply to messages as they travel through your Exchange organization. For more information, see Message size limits.
However, there are client-specific message size limits you can configure for Outlook Web App and email clients that use ActiveSync or Exchange Web Services (EWS). If you change the Exchange organization-wide message size limits, you need to verify that the message size limits for Outlook Web App, ActiveSync, and Exchange Web Services are set accordingly. You configure these values in web.config files on Client Access servers and Mailbox servers. These limits are described in the following tables.
ActiveSync
Server role | Configuration file | Keys and default values | Size |
---|---|---|---|
Client Access | %ExchangeInstallPath%FrontEndHttpProxySyncweb.config |
maxRequestLength="10240" |
kilobytes |
Mailbox | %ExchangeInstallPath%ClientAccessSyncweb.config |
maxRequestLength="10240" |
kilobytes |
Mailbox | %ExchangeInstallPath%ClientAccessSyncweb.config |
<add key="MaxDocumentDataSize" value="10240000"> |
bytes |
Comments on ActiveSync limits
By default, there is no maxAllowedContentLength key in the web.config
files for ActiveSync. However, the maximum message size for ActiveSync is affected by the maxAllowedContentLength value that is applied to all websites on the server. The default value is 3000000 bytes. To see these values for ActiveSync on Client Access Servers and Mailbox servers in IIS Manager, perform the following steps:
- Do one of the following:
- On Client Access servers, open IIS Manager, navigate to Sites > Default Web Site and select Microsoft-Server-ActiveSync.
- On Mailbox servers, open IIS Manager, navigate to Sites > Exchange Back End and select Microsoft-Server-ActiveSync.
- Verify Features View is selected, and double-click Configuration Editor in the Management section.
- Click the dropdown arrow in the Section field, navigate to system.webServer > security and select requestFiltering.
- In the results, expand requestLimits, and you’ll see maxAllowedContentLength and the default value 30000000 (bytes).
To change the maxAllowedContentLength value, enter a new value in bytes, and click Apply. You need to change the value on Client Access servers and on Mailbox servers. After you change the value in IIS Manager, a new maxAllowedContentLength key is written to the corresponding web.config
file (%ExchangeInstallPath%FrontEndHttpProxySyncweb.config
on Client Access servers, and %ExchangeInstallPath%ClientAccessSyncweb.config
on Mailbox servers).
To change the maximum message size for ActiveSync clients, you need to change the value of maxRequestLength in the web.config
file on Client Access servers and Mailbox servers, MaxDocumentSize in the web.config
file on Mailbox servers, and maxAllowedContentLength in IIS Manager on Client Access servers and Mailbox servers.
Exchange Web Services
Serve role | Configuration file | Keys and default values | Size |
---|---|---|---|
Client Access | %ExchangeInstallPath%FrontEndHttpProxyewsweb.config |
maxAllowedContentLength="67108864" |
bytes |
Mailbox | %ExchangeInstallPath%ClientAccessexchwebewsweb.config |
maxAllowedContentLength="67108864" |
bytes |
Mailbox | %ExchangeInstallPath%ClientAccessexchwebewsweb.config |
14 instances of maxReceivedMessageSize="67108864" |
bytes |
Comments on Exchange Web Services limits
- There are 14 separate instances of the value
maxReceivedMessageSize="67108864"
that correspond to different combinations of bindings (http and https) and authentication methods. - To change the maximum message size for Exchange Web Services clients, you need to change the value of maxAllowedContentLength in both
web.config
files, and all 14 instances ofmaxReceivedMessageSize="67108864"
in theweb.config
file on Mailbox servers. - In the
web.config
file on Mailbox servers, there are also two instances of the valuemaxReceivedMessageSize="1048576"
for UMLegacyMessageEncoderSoap11Element bindings that you don’t need to modify. - maxRequestLength is an ASP.NET setting that’s present in both web.config files, but is not used by Exchange Web Services, so you don’t need to modify it.
Outlook Web App
Server role | Configuration file | Keys and default values | Size |
---|---|---|---|
Client Access | %ExchangeInstallPath%FrontEndHttpProxyowaweb.config |
maxAllowedContentLength="35000000" |
bytes |
Client Access | %ExchangeInstallPath%FrontEndHttpProxyowaweb.config |
maxRequestLength="35000" |
kilobytes |
Mailbox | %ExchangeInstallPath%ClientAccessOwaweb.config |
maxAllowedContentLength="35000000" |
bytes |
Mailbox | %ExchangeInstallPath%ClientAccessOwaweb.config |
maxRequestLength="35000" |
kilobytes |
Mailbox | %ExchangeInstallPath%ClientAccessOwaweb.config |
2 instances of maxReceivedMessageSize="35000000" |
bytes |
Mailbox | %ExchangeInstallPath%ClientAccessOwaweb.config |
2 instances of maxStringContentLength="35000000" |
bytes |
Comments on Outlook Web App limits
- In the
web.config
file on Mailbox servers, there are two separate instances of the valuesmaxReceivedMessageSize="35000000"
andmaxStringContentLength="35000000"
that correspond to http and https bindings. - To change the maximum message size for Outlook Web App clients, you need to change all of these values in both files, including both instances of maxReceivedMessageSize and maxStringContentLength in the
web.config
file on Mailbox servers. - In the
web.config
file on Mailbox servers, there is also an instance of the valuemaxStringContentLength="102400"
for the MsOnlineShellService binding that you don’t need to modify.
For all message size limits, you need to set values that are larger than the actual sizes you want enforced. This increase in values is necessary to account for the inevitable message size increase that occurs after the message attachments and any other binary data are Base64 encoded. Base64 encoding increases the size of the message by approximately 33%, so the values you specify for any message size limits are approximately 33% larger than the actual usable message sizes. For example, if you specify a maximum message size value of 64 MB, you can expect a realistic maximum message size value of approximately 48 MB.