Environment

Netmail Archive 5.2.2.x and higher

Synopsis

An issue has been identified while migrating messages into Exchange 2013 where large attachments fail to inject into mailboxes. The following errors are apparent in the job traces:

Description: transaction error [add] the message exceeds the maximum supported size.

Or:

Description: transaction error [add] the request failed. the remote server returned an error: (507) insufficient storage

This article will explain how to resolve such errors by increasing the existing message size limits.

Solution

With Microsoft Exchange Server 2013, there are several different message size limits that apply to messages as they travel through Exchange. These message size limits will apply to Outlook Web App and email clients that use Exchange Web Services (EWS). Such limits can be configured in the EWS web.config file found on all Client Access servers (CAS). The issue described above is caused by a setting in the web.config file that restricts the size of messages/attachments that may be injected. To resolve the size limit issue, a configuration change must be made to the web.config file on each CAS server as follows:

1. Open a CMD (run as administrator).

2. Browse to C:\Windows\System32\Inetsrv

3. To see the current value, run the following command:

appcmd list config "Default Web Site/ews" -section:requestFiltering

4. Depending on the size of attachments or messages, the content_Length_In_Bytes value returned by the command may need to be changed to a larger one. Note that a value of 104857600 represents 100 MBs in bytes. 

The default value is <requestLimits maxAllowedContentLength="67108864"> and this may be sufficient for most organizations, but since users sometimes send very large attachments, the limit may need to be increased.

To change the existing value, run the following command:

appcmd set config "Default Web Site/ews" -section:requestFiltering -requestLimits.maxAllowedContentLength:<content_Length_In_Bytes>

5. Once the limit has been updated, restart IIS on all CAS servers to activate the change by running the iisreset command at the command prompt. If the CAS server(s) is/are currently in use by users, this may be done after hours.

More information on Message Size Limits is available here from the Microsoft TechNet Library. 

 

Notes