There are different different level where you can define email size limit. Mostly are on Hub Transport server like connectors, transport rules. You can define on per mailbox or organization wide as well.
In this article we will talk about how to configure limits by Exchange Activesync, Exchange web services and outlook on the web clients.
To change the message size limit for a specific client type, you need to change all the values that are described in the table.
Activesync:-
Services | Configuration file | Keys and default values | Size |
Client Access (frontend) | %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config | maxAllowedContentLength="30000000" | bytes |
Client Access (frontend) | %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config | maxRequestLength="10240" | kilobytes |
Backend | %ExchangeInstallPath%ClientAccess\Sync\web.config | maxAllowedContentLength="30000000 bytes" | bytes |
Backend | %ExchangeInstallPath%ClientAccess\Sync\web.config | maxRequestLength="10240" | kilobytes |
Backend | %ExchangeInstallPath%ClientAccess\Sync\web.config | <add key="MaxDocumentDataSize" value="10240000"> | bytes |
Note:- Put Values as per your requirement
Exchange Web Services:-
Service | Configuration file | Keys and default values | Size |
Client Access (frontend) | %ExchangeInstallPath%FrontEnd\HttpProxy\ews\web.config | maxAllowedContentLength="67108864" | bytes |
Backend | %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config | maxAllowedContentLength="67108864" | bytes |
Backend | %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config | 14 instances of maxReceivedMessageSize="67108864" | bytes |
Outlook on the Web:-
Service | Configuration file | Keys and default values | Size |
Client Access (frontend) | %ExchangeInstallPath%FrontEnd\HttpProxy\owa\web.config | maxAllowedContentLength="35000000" | bytes |
Client Access (frontend) | %ExchangeInstallPath%FrontEnd\HttpProxy\owa\web.config | maxRequestLength="35000" | kilobytes |
Backend | %ExchangeInstallPath%ClientAccess\Owa\web.config | maxAllowedContentLength="35000000" | bytes |
Backend | %ExchangeInstallPath%ClientAccess\Owa\web.config | maxRequestLength="35000" | kilobytes |
Backend | %ExchangeInstallPath%ClientAccess\Owa\web.config | 2 instances of maxReceivedMessageSize="35000000" | bytes |
Backend | %ExchangeInstallPath%ClientAccess\Owa\web.config | 2 instances of maxStringContentLength="35000000" | bytes |
Note:- Due to Base64 encoding of attachments and other binary data, increases the size of the message by approximately 33%, so the value you specify should be approximately 33% larger than the actual message size you want enforced. For example, if you specify a maximum message size value of 64 MB, you can expect a realistic maximum message size of approximately 48 MB.
If you change size limits on organization level connector or user message size limits then you have to modify limits on Activesync, EWS and Outlook on the web (Formerly known as OWA).
Configuring Settings using Command Line:-
You can use Notepad or command line to configure these Settings. I prefer to use command line so here is how you can do it:-
Active Sync:-%windir%\system32\inetsrv\appcmd.exe set config «Default Web Site/Microsoft-Server-ActiveSync/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:30000000 %windir%\system32\inetsrv\appcmd.exe set config «Default Web Site/Microsoft-Server-ActiveSync/» -section:system.web/httpRuntime /maxRequestLength:10240 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/Microsoft-Server-ActiveSync/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:30000000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/Microsoft-Server-ActiveSync/» -section:system.web/httpRuntime /maxRequestLength:10240 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/Microsoft-Server-ActiveSync/» -section:appSettings /[key=’MaxDocumentDataSize’].value:10240000
Exchange Web Services:-%windir%\system32\inetsrv\appcmd.exe set config «Default Web Site/ews/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSAnonymousHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSAnonymousHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSBasicHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSBasicHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSNegotiateHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSNegotiateHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecuritySymmetricKeyHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecuritySymmetricKeyHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityX509CertHttpsBinding’].httpsTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityX509CertHttpBinding’].httpTransport.maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /webHttpBinding.[name=’EWSStreamingNegotiateHttpsBinding’].maxReceivedMessageSize:67108864 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/ews/» -section:system.serviceModel/bindings /webHttpBinding.[name=’EWSStreamingNegotiateHttpBinding’].maxReceivedMessageSize:67108864
Outlook on the web:-%windir%\system32\inetsrv\appcmd.exe set config «Default Web Site/owa/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:35000000 %windir%\system32\inetsrv\appcmd.exe set config «Default Web Site/owa/» -section:system.web/httpRuntime /maxRequestLength:35000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:35000000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.web/httpRuntime /maxRequestLength:35000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.serviceModel/bindings /webHttpBinding.[name=’httpsBinding’].maxReceivedMessageSize:35000000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.serviceModel/bindings /webHttpBinding.[name=’httpBinding’].maxReceivedMessageSize:35000000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.serviceModel/bindings /webHttpBinding.[name=’httpsBinding’].readerQuotas.maxStringContentLength:35000000 %windir%\system32\inetsrv\appcmd.exe set config «Exchange Back End/owa/» -section:system.serviceModel/bindings /webHttpBinding.[name=’httpBinding’].readerQuotas.maxStringContentLength:35000000
Note:- Don’t Forget to Reset IIS after modifying these settings else settings will not take affect.
Note:- Make sure you document all custom settings which you have modified in any config file on Exchange server. Whenever you install Exchange CU, all custom settings will go and you have to put those again.
Reference:- https://technet.microsoft.com/en-us/library/hh529949(v=exchg.160).aspx