Exchange 2016: Change size limit for ActiveSync

Size limits for emails can be set in several places with Exchange Server 2016. There are size limits for mails not only for receiving and sending connectors, but also for ActiveSync, Exchange Web Services (EWS) and OWA (or Outlook on the Web).

The standard limit for ActiveSync clients is 10 MB, whereas the limit for EWS is 64 MB and for OWA 35 MB. However, Base64 encoding must also be taken into account here. Base64 encoding increases the size of the mail by approx. 33%. For ActiveSync this means that a mail may only be approx. 7 MB in size, for EWS it is approx. 48 MB. It is not possible to say exactly how large a mail may be, but the following can be used as a rule of thumb:

  • Size of the mail incl. attachments + 33 % = Actual mail size

If users of tablets and smartphones want to send mails via ActiveSync that are larger than approx. 7 MB, the limit can be increased accordingly.

Manual adjustment of the active sync limit

The limit for ActiveSync can be set manually by editing the IIS configuration in the IIS Manager and the web.config of the ActiveSync directory. It is somewhat easier to do this using a script (see below), so the manual method is more suitable for checking the settings or for small Exchange organizations.

To do this, select the configuration editor for the ActiveSync directory in the IIS Manager:

Exchange 2016: Change size limit for ActiveSync

The "system.webServer/security/requestFiltering" section can now be selected:

Exchange 2016: Change size limit for ActiveSync

The "maxAllowedContentLength" setting can be found under "requestLimits". In the default setting, a value of 30000000 bytes is specified here, which roughly corresponds to 28 MB. If it is planned to increase the ActiveSync limit to a value below 28 MB, the default value can therefore be retained. For larger ActiveSync limits, such as 50 MB, the value must be increased accordingly. In this example, the limit is set to approx. 50 MB for the actual mail size:

  • 50 MB + 33 % = 66.5 MB (converted 69730304 bytes)

The value for "maxAllowedContentLength" therefore corresponds to 69730304 in this example:

Exchange 2016: Change size limit for ActiveSync

The same settings must now be repeated once for the Exchange Back End:

Exchange 2016: Change size limit for ActiveSync

After the configuration has been adjusted in the IIS Manager, the corresponding web.config files can now be found in the following directories:

  • %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config (FrontEnd)
  • %ExchangeInstallPath%ClientAccess\Sync\web.config (backend)

Note: The web-config files only exist once the value has been adjusted in the IIS Manager.

The following line must now be edited in both files, here the value is now specified in kilobytes:

  • <httpRuntime maxRequestLength=“10240″ fcnMode=“Disabled“ />

Exchange 2016: Change size limit for ActiveSync

50 MB + 33 % = 66.5 MB (equivalent to 68096 kilobytes)

Another value must be adjusted in the web.config of the backend, but here it is bytes again:

  • <add key=“MaxDocumentDataSize“ value=“10240000″>

Exchange 2016: Change size limit for ActiveSync

50 MB + 33 % = 66.5 MB (converted 69730304 bytes)

After the settings have been made, the IIS must be restarted using "iisreset".

Adjusting the ActiveSync limit via script

The following small script can be used to set the appropriate settings. The script sets the limit for Active Sync to 66.5 MB, which corresponds approximately to an actual mail size of 50 MB. If there are multiple Exchange 2016 servers in the organization, the script must be executed on all Exchange servers:

%windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/Microsoft-Server-ActiveSync/" -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
%windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/Microsoft-Server-ActiveSync/" -section:system.web/httpRuntime /maxRequestLength:68096
%windir%\system32\inetsrv\appcmd.exe set config "Exchange Back End/Microsoft-Server-ActiveSync/" -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
%windir%\system32\inetsrv\appcmd.exe set config "Exchange Back End/Microsoft-Server-ActiveSync/" -section:system.web/httpRuntime /maxRequestLength:68096
%windir%\system32\inetsrv\appcmd.exe set config "Exchange Back End/Microsoft-Server-ActiveSync/" -section:appSettings /[key='MaxDocumentDataSize'].value:69730304

After the script has been executed, the IIS must be restarted:

iisreset

The limits can be adjusted in the script, but attention must be paid to the different units:

  • maxAllowedContentLength = value in bytes
  • maxRequestLength = value in KiloBytes
  • MaxDocumentDataSize = value in bytes

Note

Since the settings for the limits are made in the web.config, it can happen that the default values apply again after the installation of Exchange updates. After a CU for Exchange 2016 has been installed, the settings should therefore be checked. A small batch script as described above can also be executed as a precaution after an Exchange update (do not forget to reset IIS).

32 thoughts on “Exchange 2016: Größenbeschränkung für ActiveSync verändern”

  1. Servus Frank,

    wir sind mit einem OnPrem Exchange Server 2016 die letzten Tage genau auf dasselbe Phänomen gestoßen.
    Wir waren nicht in der Lage eine Email von unseren Mobiltelefonen zu versenden die nur Text beinhalteten und ca. 1-3 KB groß sind/ waren, schon gar keine mit Anhang.

    Wir haben daher deine Anleitung befolgt und hatten zunächst keinen Erfolg.

    Was wir jedoch festgestellt hatten war, dass sämtliche Exchange PowerShell Module für den Exchange abhanden gekommen waren durch die „Umstellung“.

    Wir konnten uns nicht einmal mehr die Mailboxen oder sonstiges anschauen.
    Warum das so war oder ist kann ich beim besten Wissen und Gewissen nicht erklären.
    Wir haben diese Module jedoch wieder nachinstalliert.

    Nach ca. einer weiteren Stunde habe ich mit meinem Telefon dann den Test gemacht und mich vorher nochmal aus Outlook abgemeldet und wieder angemeldet.
    Und siehe da:
    WIR KÖNNEN WIEDER EMAILS MIT ANHÄNGEN VERSENDEN UND AUCH NORMALE MAILS!!!

    Ich möchte mich daher an dieser Stelle bedanken für deine wertvolle Anleitung.

    Reply
  2. Hallo,
    wir betreiben bei uns einen Exchange-Server 2016 und hatten nun mehrfach den Fall, das wir E-Mails mit Anhängen die größer als unsere Systemvorgabe war, nicht zugestellt bekommen hatten. Im Log konnte das auch nachvollzogen werden, weil dort eine Zeile zu finden war in der zu erkennen war, das der Server die Nachricht nicht angenommen hat.

    Was für uns nicht nachvollziehbar ist, ist, ob der Absender des zu großen Anhangs über den Umstand informiert wurde, ähnlich wie bei einem Versand an eine falsche Empfänger-Adresse. Anders gesagt, ob unser Serverer eine Nachricht mit der Info zumindest nachweislich verlassen hat, einmal unabhängig davon was das Empfängersystem dann damit macht.

    Gibt es in Exchange eine Stelle bei der diese Einstellung aktiv gesetzt werden muss oder ist der Versand einer Meldung an einem Absender so oder so ein Standard? Vielen Dank für euer Feedback

    Reply
  3. Hallo Frank,
    habe die Anpassungen wie Du beschrieben hast an einem EX 2019 vorgenommen, weil wir immer wieder bei dem iPad des Geschäftsführer eines Kunden den Fehler bekommen, dass das Postfach voll sei. Ich habe leider nach der Anpassung der Werte auf 100 MB immer noch die Meldung. Gibt es nach aktuellen Stand mit dem letzten CU hier noch einen weitere Änderung? Wo kann ich hier noch weiter suchen?
    Dank für eine Rückmeldung

    Reply
    • Wir haben das selbe Problem mit allen IPhone-Geräten. Androind funktioniert, IOS nicht. Bei IOS kommt die Mailgrößenüberschreitung ab 1MB. Obwohl 50 MB eingestellt sind. Hat hier jemand schon eine Lösung gefunden?

      Danke und Liebe grüße
      Red

      Reply
  4. Mein Script:

    @echo off
    echo.BackUp
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Autodiscover\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Autodiscover\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AcceptedDomain\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AcceptedDomain\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ActionCenter\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ActionCenter\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AddressList\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AddressList\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AdminHome\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AdminHome\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AdvancedThreats\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AdvancedThreats\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Antimalware\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Antimalware\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Antispam\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Antispam\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AtpPolicy\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\AtpPolicy\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\bin\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\bin\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\BulkEdit\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\BulkEdit\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\CertMgmt\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\CertMgmt\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Connect\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Connect\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ConnectorMgmt\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ConnectorMgmt\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Connectors\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Connectors\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Current\scripts\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Current\scripts\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Current\themes\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Current\themes\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Customize\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Customize\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\DBMgmt\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\DBMgmt\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\DLPPolicy\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\DLPPolicy\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\EmailAddressPolicy\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\EmailAddressPolicy\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Extension\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Extension\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Federation\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Federation\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\fonts\5.27.1\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\fonts\5.27.1\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Handlers\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Handlers\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Helpdesk\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Helpdesk\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Hybrid\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Hybrid\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\MessageTrace\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\MessageTrace\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Migration\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Migration\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\MyGroups\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\MyGroups\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\O365\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\O365\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Organize\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Organize\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\OwaMailboxPolicy\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\OwaMailboxPolicy\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PersonalSettings\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PersonalSettings\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PhoneVoice\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PhoneVoice\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Pickers\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Pickers\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ProtectionHygiene\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\ProtectionHygiene\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PublicFolders\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\PublicFolders\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Quarantine\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Quarantine\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\RemoteDomain\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\RemoteDomain\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Reporting\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Reporting\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Roles\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Roles\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\RulesEditor\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\RulesEditor\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SafeAttachment\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SafeAttachment\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SafeLinks\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SafeLinks\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Search\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Search\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Security\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Security\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Servers\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Servers\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SMS\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SMS\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Supervision\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Supervision\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SupervisoryReview\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\SupervisoryReview\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\TeamMailbox\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\TeamMailbox\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\TransportGlobalSettings\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\TransportGlobalSettings\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Troubleshooting\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Troubleshooting\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\UrlTrace\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\UrlTrace\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\UsersGroups\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\UsersGroups\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\VDirMgmt\Web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\VDirMgmt\Web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\ews\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\ews\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\mapi\emsmdb\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\mapi\emsmdb\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\mapi\nspi\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\mapi\nspi\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\OAB\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\OAB\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\Current2\version\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\Current2\version\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell-Proxy\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell-Proxy\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PushNotifications\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PushNotifications\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\rest\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\rest\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\RpcProxy\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\RpcProxy\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Sync\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Sync\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\autodiscover\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\autodiscover\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ecp\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ecp\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ews\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ews\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\mapi\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\mapi\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\oab\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\oab\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\powershell\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\powershell\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\pushnotifications\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\pushnotifications\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ReportingWebService\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ReportingWebService\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\rest\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\rest\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\rpc\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\rpc\web.config.bak.attachment“
    copy /y „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\sync\web.config“ „C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\sync\web.config.bak.attachment“
    pause
    cls
    echo.ActiveSync
    %windir%\system32\inetsrv\appcmd.exe set config „Default Web Site/Microsoft-Server-ActiveSync/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Default Web Site/Microsoft-Server-ActiveSync/“ -section:system.web/httpRuntime /maxRequestLength:68096
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/Microsoft-Server-ActiveSync/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/Microsoft-Server-ActiveSync/“ -section:system.web/httpRuntime /maxRequestLength:68096
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/Microsoft-Server-ActiveSync/“ -section:appSettings /[key=’MaxDocumentDataSize‘].value:69730304
    echo.EWS
    %windir%\system32\inetsrv\appcmd.exe set config „Default Web Site/ews/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSAnonymousHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSAnonymousHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSBasicHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSBasicHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSNegotiateHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSNegotiateHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecuritySymmetricKeyHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecuritySymmetricKeyHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityX509CertHttpsBinding‘].httpsTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /customBinding.[name=’EWSWSSecurityX509CertHttpBinding‘].httpTransport.maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’EWSStreamingNegotiateHttpsBinding‘].maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/ews/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’EWSStreamingNegotiateHttpBinding‘].maxReceivedMessageSize:69730304
    echo.OWA
    %windir%\system32\inetsrv\appcmd.exe set config „Default Web Site/owa/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Default Web Site/owa/“ -section:system.web/httpRuntime /maxRequestLength:68096
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.web/httpRuntime /maxRequestLength:68096
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’httpsBinding‘].maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’httpBinding‘].maxReceivedMessageSize:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’httpsBinding‘].readerQuotas.maxStringContentLength:69730304
    %windir%\system32\inetsrv\appcmd.exe set config „Exchange Back End/owa/“ -section:system.serviceModel/bindings /webHttpBinding.[name=’httpBinding‘].readerQuotas.maxStringContentLength:69730304
    pause
    iisreset

    Reply
  5. Hi zusammen,

    Danke erstmal für die Anleitung.
    Ist das auch geltend für Exchange 2019 oder gibt’s da noch was anderes zu beachten?

    Vielen Dank im Voraus

    Reply
  6. Hallo zusammen,

    bei mir hat es (Exchange 2016) trotz aller genannten Dinge nicht geklappt, und erst nach zusätzlicher manueller Anpassung von
    „maxRequestLength“ auch in den beiden folgenden Dateien funktioniert:
    %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config
    %ExchangeInstallPath%ClientAccess\Sync\web.config

    Reply
    • und das weil vermutlich ja das letzte Update alles gebügelt hat, die Anpassung steht schließlich in Franks Anleitung auch so drin. Da ich die aber schon durch hatte ist es die wahrscheinlichste Variante warum schon wieder 10MB drinstand. Also leider keine neue Info wie mir beim erneuten Querlesen auffällt…

      Reply
  7. Hallo Zusammen,

    habt ihr hier eine Lösung gefunden? Habe das gleiche Problem mit CU22. Ob vorher schon vorhanden war, kann ich nicht sagen, bin mitten in der Migration.

    Reply
  8. @ Steffen: Hast Du das Problem lösen können? Stehe vor der selben Herausforderung und beiße mir die Zähne aus.
    Neuestes Ex 2016 CU21 alle Einstellungen wie oben durchgeführt, keine Fehler im Active Sync IIS Log erkennbar und dennoch gehen vom iPhone / iPad keine Mails mit Anhängen oberhalb 1 MB raus – Server lehnt ab, weil die Nachricht zu groß ist.

    Mit CU20 lief alles super mit den obigen Einstellungen, scheinbar gibt es bei CU21 eine Änderung.

    Reply
    • Hi André, ich habe ein nahezu identisches Verhalten bei unserem Exchange 2019 mit dem jüngsten CU10, so langsam gehen mir die Ideen aus…

      Hast du eine Lösung finden können?
      Bei uns sind Mobilgeräte im Allgemeinen betroffen, egal ob Android oder IOS.

      Die einzige Fehlermeldung die ich auf dem ein oder anderen Endgeräte erhalte ist „413 Request Entity too large“.

      Es scheint sich m.E. auf die individuelle Größe eines einzelnen Attachments zu beziehen, hänge ich mehrere kleine an, so kann ich auch über 1 MB versenden.
      Ein einzelnes Attachment mit 745KB kann ich noch senden, 781KB geht schon nicht mehr.

      Reply
  9. Hallo,

    ich habe versucht das Active Sync Limit gemäß der Anleitung anzupassen (Exchange 2016).
    Leider werden die geänderten Einstellungen trotz iisreset und Serverneustart nicht übernommen.
    Was kann gemacht werden damit die Einstellungen übernommen werden?

    Reply
    • Hallo,

      ich habe gestern auf CU6 (Exchange 2019) upgedatet und nun kann man vom Android und iOS keine Mails mit Anhang mehr versenden trotz erneuter Anpassung der Werte sowie iisrese und Server Neustart.

      DIese Befehl gibt auch korrekt Werte aus:
      Get-ReceiveConnector | Format-Table Name,Max*Size,MaxRecipientsPerMessage; Get-SendConnector | Format-Table Name,MaxMessageSize; Get-AdSiteLink | Format-Table Name,MaxMessageSize; Get-DeliveryAgentConnector | Format-Table Name,MaxMessageSize; Get-ForeignConnector | Format-Table Name,MaxMessageSize

      Reply
  10. Hallo Zusammen,

    ich habe hier einen Exchange (15.1.1913.5).
    Und habe trotz der Anpassungen die Frank hier beschrieben hat weiterhin das Problem, dass ich Anhänge am Handy <600kb nicht verschicken kann. Ich habe das Script benutzt und den IIS geprüft, hier passt auch alles.
    Dann habe ich wie Marvin beschrieben hat die MobiledeviceMailboxPolicy auch noch angepasst.
    Bei meinem Testuser habe ich dann auch noch den MaxSendSize angepasst.

    Ich habe jetzt also beim Send- sowie Receiveconnector 50MB, bei der Transportconfig 50MB, bei der Testusermailbox 50MB und in der mobiledevicemailboxpolicy 50MB.

    (Den Wert habe ich bewusst nicht auf unlimited gestellt, da ich bereits bei Kunden das Problem hatte das unlimited=/=unlimited war sondern 5MB – glaube das lag daran dass die Exchange Server geupgraded worden sind.

    Leider kann ich weiterhin keine Anhänge verschicken. Hat noch jemand eine Idee welchen Wert man anpassen kann/muss damit ich am Handy Anhänge verschicken kann?

    Bin für jeden Vorschlag dankbar.

    Vielen Dank!

    Reply
    • Hallo Arne,

      hast du inzwischen eine Lösung gefunden, damit du Mails mit Anhängen >600KB verschicken kannst?
      Bei uns im Unternehmen funktioniert dies auch bei einigen Usern nicht.

      Gruß Stefan

      Reply
      • Hallo Stefan,

        stand jetzt habe ich dafür noch keine Lösung gefunden, ich muss auch zugeben das ich nicht weiter nach einer Lösung gesucht habe, da mein Kunde die meisten Bilder anders versendet.

        Gruß Arne

        Reply
  11. Hallo,
    betrifft die Base64 Kodierung auch OWA ?
    Kannst du das Script für OWA bitte auch online stellen ?

    lg
    Georg

    Reply
  12. Hi Franky,

    Nur die letzte Zeile des Skripts geht bei einem Exchange 2019 nicht mehr – ich hab auch in das web.config unter C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Sync nachgesehen, und keinen entsprechend vorhandenen Wert gefunden – ist das egal?

    Reply
  13. Hallo Franky, vielen Dank erst einmal für diese und all deine anderen anderen Anleitungen!

    Ich versuche auf einem Exchange Server 2016 CU13 das Limit für E-Mails auf 100MB anzuheben. Dabei soll es vor allem möglich sein, entsprechend große Anhänge per OWA zu verschicken. Bitte lasst uns nicht über Sinn und Unsinn sprechen ;)

    Was ich bisher getan habe (an dieser Stelle habe ich aufgrund des Overheads 130MB verwendet):

    Set-TransportConfig -MaxReceiveSize 130MB -MaxSendSize 130MB
    Get-ReceiveConnector | Set-ReceiveConnector -MaxMessageSize 130MB
    Get-SendConnector | Set-SendConnector -MaxMessageSize 130MB
    Get-Mailbox | Set-Mailbox -MaxSendSize 130MB -MaxReceiveSize 130MB

    Der Transport-Dienst wurde neugestartet.

    In der Datei „\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\web.config“ habe ich folgende Werte angepasst:
    > maxAllowedContentLength=“136314880″
    > maxRequestLength=“133120″

    Und in der Datei „\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\web.config“ ebenfalls folgende Werte:
    > maxAllowedContentLength=“136314880″
    > maxRequestLength=“133120″
    > maxReceivedMessageSize=“136314880″ (Wert existiert zwei Mal in der Datei)
    > maxStringContentLength=“136314880″ (Wert existiert zwei Mal in der Datei)

    iisreset wurde durchgeführt.

    Wenn ich nun via OWA einen Anhang mit 90 MB hinzufüge, erhalte ich nach einigen Momenten eine E-Mail zurück mit der Fehlermeldung:
    „Ihre Nachricht wurde aufgrund ihrer Größe an keinen Benutzer zugestellt. Der Grenzwert liegt bei 100 MB. Die Größe Ihrer Nachricht beträgt 123 MB“.

    Kurzum: An welcher Stelle kann noch ein Wert von 100 MB gesetzt sein?

    Danke für eure Unterstützung im Voraus!
    Pascal

    Reply
  14. Hallo,

    ich habe das Problem bei einem Exchange 2019.
    Im BackEnd konnte ich den Wert: nicht finden. Auch der Wert war nicht zu finden. Oder muss dieser hinzugefügt werden?

    Reply
  15. Danke für den Artikel!

    Habe die Skripte laufen lassen, jetzt sind die Dateien beschädigt, bekomme die Meldung: Die Konfigurationsdatei ist kein wohlgeformtes XML-Dokument. Die Sicherung habe ich im Eifer des Gefechts vergessen… SCH..

    Ich habe das seid dem CU13 das Problem das kein iPhone mehr sync. So bin ich auf den Artikel gestoßen.

    Kann mir jemand helfen?

    Gruß Martin

    Reply
  16. Danke für den Artikel.
    Noch eine Anmerkung, falls andere Leute trotz der hier vorgestellten Anpassungen keine großen Anhänge via ActiveSync herunterladen können.
    Bei uns (Exchange 2016) musste zusätzlich noch die MobileDeviceMailboxPolicy angepasst werden. Diese beinhaltet einen MaxAttachmentSize-Parameter. Der Wert ist unabhängig von der web.config. Als wir diesen auf Unlimited gesetzt hatten, war der Download von Dateianhängen kein Problem mehr. Über die GUI kann man diesen Wert nicht ändern (was wohl in Exchange 2010 noch möglich war?!).

    Set-MobileDeviceMailboxPolicy -Identity „Policy-Name“ -MaxAttachmentSize Unlimited

    Reply
  17. Die oben angegebenen Zeilen gibt es nbei mir nicht
    Das wird bei mir so nicht erzeugt, vielmehr unter: (wenn ich im IIS aus 30 45 mache entsteht in der web.config):

    Reply
  18. …ich kann bestätigen, dass es auch auf einem Exchange 2013 funktioniert.

    Habe es nun auf einem Stand-Alone 2016 und einem 2013er DAG Cluster getestet.

    Reply
  19. Hallo Frank, wieder einmal eine tolle Anleitung! Was würde ich ohne deine Seite machen :-).

    Aber wieso macht es MS einem so schwer eine „kleine“ Sache so umständlich zu ändern? Das sind in meinen Augen doch Dinge, die maximal ein mal angepasst werden, und dann für alle Bereiche – oder sehe ich das falsch?? Klar, wenn ich mit dem Smartphone ein Video mit 50GB per Mail versenden möchte kann das problematisch werden. Aber da ein Exchange Server eher im geschäftlichen Umfeld eingesetzt wird, ist der Spielraum doch etwas größer….

    Exchange 2013 auch umsetztbar??

    Danke nochmals für die Anleitung.

    Reply

Leave a Comment