This is an optional step for mail systems within the Exchange server family. It is structured for Exchange On-Premises tenants.
There are three limits that should be addressed to increase the maximum send and received size.
Increase Message Size Limits
This is a two-step process. The reason for this is that if the message size limits are increased, the IIS limits will also have to be increased to allow increased payloads. There are other non-standard settings that can also cause size restrictions for the IIS or EWS connections, but we are unable to troubleshoot or identify specific environment restrictions outside of these settings.
To display current message size limits:
- Open the Exchange Management Shell.
- Enter the following commands:
Get-TransportConfig | Format-List -Property MaxReceiveSize, MaxSendSize
Get-SendConnector | Format-List -Property Identity, MaxMessageSize
Get-ReceiveConnector | Format-List -Property Identity, MaxMessageSize
Get-MailBox | Format-List -Property PrimarySmtpAddress, MaxSendSize, MaxReceiveSize
To increase message size limits on the Exchange Server:
- Open the Exchange Management Shell.
- Enter the following commands:
Set-TransportConfig -MaxReceiveSize 150MB -MaxSendSize 150MB
Get-SendConnector | Set-SendConnector -MaxMessageSize 150MB
Get-ReceiveConnector | Set-ReceiveConnector -MaxMessageSize 150MB
Get-Mailbox | Set-Mailbox -MaxSendSize 150MB -MaxReceiveSize 150MB
Increase IIS Limits to Allow Accepting Payloads
There are three limits that should be increased in IIS:
- maxRequestLength
- maxAllowedContentLength
- maxReceivedMessageSize
Follow these steps to increase the Exchange message size limits on your client access server:
- OpenWindows Explorer.
- Navigate to %ExchangeInstallPath%FrontEnd\HttpProxy\ews\
- Open the file Web.Config in a text editor, such as Notepad.
- Find the XML tag starting with for each change.
- Change the existing value to maxRequestLength="200000" -- this occurs in one place in the Web.Config file.
- Change the existing values to maxAllowedContentLength="200000000" -- this occurs one place in the Web.Config file.
- Change the existing values to maxReceivedMessageSize="200000000" -- this entry occurs up to 12 times. This needs to be changed for each Authentication method.
For example:
<httpsTransport maxReceivedMessageSize="200000000" authenticationScheme="Anonymous" maxBufferSize="81920" transferMode="Streamed" />
<httpsTransport maxReceivedMessageSize="200000000" authenticationScheme="Basic" maxBufferSize="81920" transferMode="Streamed" />
etc. - If you are running IIS7 and Windows 2008, it may be necessary to increase WCF settings.
- Save the file.
- IIS Reset is not needed, web.config changes are picked up by the next connection.
Follow these steps to increase the Exchange message size limits on your mailbox server:
- OpenWindows Explorer.
- Navigate to %ExchangeInstallPath%ClientAccess\exchweb\ews\
- Open the file Web.Config in a text editor, such as Notepad.
- Find the XML tag starting with for each change.
- Change the existing value to maxRequestLength="200000" -- this occurs in one place in the Web.Config file.
- Change the existing values to maxAllowedContentLength="200000000" -- this occurs one place in the Web.Config file.
- Change the existing values to maxReceivedMessageSize="200000000" -- this entry occurs up to 12 times. This needs to be changed for each Authentication method.
- If you are running IIS7 and Windows 2008, it may be necessary to increase WCF settings.
- Save the file.
- IIS Reset is not needed, web.config changes are picked up by the next connection.
Increase Maximum Accepted Content Length
You may increase the maximum accepted content length by following these directions:
- Open Windows Explorer.
- Navigate to C:\Program Files\Microsoft\Exchange Server\ClientAccess\exchweb\ews
- Open the file Web.Config in a text editor such as Notepad.
- Go to the end of the file.
- Insert or edit the following XML code before the </configuration> tag:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
If XML code is already present in the Web.Config file, edit it to match what is shown above.
Sample Web.Config before changes:
<configuration>
<system.web>
...
...
</system.web>
</configuration>
Sample Web.Config after changes:
<configuration>
<system.web>
...
...
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
Increase Maximum Received Message Size
If you are running IIS7 and Windows 2008, you may need to increase WCF settings:
- Open Windows Explorer.
- Navigate to C:\Program Files\Microsoft\Exchange Server\ClientAccess\exchweb\ews
- Open the file Web.Config in a text editor like Notepad.
- Find all XML tags starting with maxReceivedMessageSize=
- Change existing values to maxReceivedMessageSize="104857600"
- Save the file.
- Open a Command Prompt (cmd.exe).
- Type: cd %windir%\system32\inetsrv
- Type: appcmd.exe set config "Default Web Site/ews" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600
- Run: iisreset