適用於:
2019
訂閱版本
在 Exchange Server 中,有數個不同的訊息大小限制會在訊息通過您的組織時套用至訊息。 如需詳細資訊,請參閱 Exchange Server 中的郵件大小和收件者限制。
不過,您可以針對先前稱為 Outlook Web App) 和使用 Exchange ActiveSync 或 Exchange Web 服務 (EWS) 的電子郵件用戶端 Outlook 網頁版 (設定用戶端特定的訊息大小限制。 如果您變更 Exchange 組織、連接器或使用者訊息大小限制,您可能需要變更 Outlook 網頁版、ActiveSync 和 EWS 的限制。 下表說明這些限制。 若要變更特定用戶端類型的訊息大小限制,您必須變更數據表中所述 的所有 值。
注意事項
針對任何郵件大小限制,您設定的值必須大於要執行的實際大小。 這說明了附件和其他二進位資料的 Base64 編碼。 Base64 編碼會使郵件大小增加約 33%,因此您指定的值應該要比執行的實際郵件大小增加約 33%。 例如,若您指定的郵件大小上限值為 64 MB,則實際的郵件大小上限約為 48 MB。
ActiveSync
| 服務 | 設定檔案 | 索引鍵和預設值 | 大小 |
|---|---|---|---|
| 用戶端存取 (前端) | %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config |
maxAllowedContentLength="30000000" 默認 (不存在;請參閱批注) |
位元組 |
| 用戶端存取 (前端) | %ExchangeInstallPath%FrontEnd\HttpProxy\Sync\web.config |
maxRequestLength="10240" |
千位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
maxAllowedContentLength="30000000 bytes" 默認 (不存在;請參閱批注) |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
maxRequestLength="10240" |
千位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
<add key="MaxDocumentDataSize" value="10240000"> |
位元組 |
ActiveSync 限制的批注
根據預設,ActiveSync 的檔案中web.config沒有 maxAllowedContentLength 密鑰。 不過,套用至伺服器上所有網站的 MaxAllowedContentLength 值會影響 ActiveSync 的訊息大小上限。 默認值為30000000個字節。 若要查看 IIS 管理員中信箱伺服器上 ActiveSync 的這些值,請執行下列步驟:
執行下列其中一個步驟:
針對 [用戶端存取 (前端) 網站,開啟 [IIS 管理員],流覽至 [ 網站>默認網站 ],然後選 取 [Microsoft-Server-ActiveSync]。
針對後端網站,開啟 [IIS 管理員],流覽至 [月>台交換後端],然後選取 [Microsoft-Server-ActiveSync]。
確認底部已選取 [功能檢視] 索引標籤,然後按兩下 [管理] 區段中的 [組態 編輯器] 。
按兩下 [ 區段 ] 欄位中的下拉式箭號,流覽至 system.webServer>安全 性,然後選取 requestFiltering。
在結果中,展開 requestLimits,您會看到 maxAllowedContentLength 和預設值 30000000 (位元組) 。
若要變更 maxAllowedContentLength 值,請輸入以位元組為單位的新值,然後按兩下 [ 套用]。 您需要變更 Client Access 網站和後端網站上的值。
注意:您可以在 [月>台默認網站>] Microsoft-Server-ActiveSync 或 Sites>Exchange 後端>Microsoft-Server-ActiveSync 變更 IIS 管理員中的相同設定,然後在 [要求限制] 區段的 [動作] 區域> [編輯功能設定] 區段>的 [允許的內容長度上限] 區段中,要求篩選 (位元組) 。
在 IIS 管理員中變更值之後,新的 maxAllowedContentLength 金鑰會寫入對應的用戶端存取或後端 web.config 表中所述的檔案。
Exchange Web 服務
| 服務 | 設定檔案 | 索引鍵和預設值 | 大小 |
|---|---|---|---|
| 用戶端存取 (前端) | %ExchangeInstallPath%FrontEnd\HttpProxy\ews\web.config |
maxAllowedContentLength="67108864" |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config |
maxAllowedContentLength="67108864" |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config |
14 個實例的 maxReceivedMessageSize="67108864" (,適用於 HTTP/https 系結和驗證方法的不同組合) |
位元組 |
EWS 限制的批注
在後端
web.config檔案中,您不需要修改 UMLegacyMessageEncoderSoap11Element 系結值的兩maxReceivedMessageSize="1048576"個實例。maxRequestLength 是同時存在於 web.config 檔案中的 ASP.NET 設定,但 EWS 不會使用此設定,因此您不需要加以修改。
Outlook 網頁版
| 服務 | 設定檔案 | 索引鍵和預設值 | 大小 |
|---|---|---|---|
| 用戶端存取 (前端) | %ExchangeInstallPath%FrontEnd\HttpProxy\owa\web.config |
maxAllowedContentLength="35000000" |
位元組 |
| 用戶端存取 (前端) | %ExchangeInstallPath%FrontEnd\HttpProxy\owa\web.config |
maxRequestLength="35000" |
千位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
maxAllowedContentLength="35000000" |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
maxRequestLength="35000" |
千位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
2 maxReceivedMessageSize="35000000" 個 HTTP 和 HTTPs 系結的 (實例) |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
2 maxStringContentLength="35000000" 個 HTTP 和 HTTPs 系結的 (實例) |
位元組 |
Outlook 網頁版 限制的批注
- 在後端
web.config檔案中,您不需要修改 MsOnlineShellService 系結的值maxStringContentLength="102400"實例。
開始之前有哪些須知?
預估完成時間:15 分鐘
Exchange 權限無法套用於此主題的程序。 這些程序是在 Exchange 伺服器的作業系統中加以執行。
您儲存至 web.config 組態檔的變更會在您重新啟動 IIS 之後套用。
若要允許因為Base64編碼而增加33%的大小,請將您所需的新大小上限值乘以4/3。 將值轉換為 KB (乘以 1024)。 若要將值轉換成位元組,請將 乘以 1048756 (1024*1024) 。 請注意,Base64 編碼所造成的大小增加可能大於 33%,並取決於數個因素 (例如,附件大小、檔類型、壓縮,以及電子郵件用戶端) 。
任何自定義的 Exchange 或 Internet Information Server (IIS) 您在 Exchange Server (上於 Exchange XML 應用程式組態檔中所做的設定,例如,當您安裝 Exchange CU 時, 將會覆寫 web.config 檔案或 EdgeTransport.exe.config 檔案) 。 請務必儲存此資訊,以便在安裝之後輕鬆地重新套用設定。 安裝 Exchange CU 之後,您必須重新設定這些設定。
如需適用於此主題中程序的快速鍵相關資訊,請參閱 Exchange 系統管理中心的鍵盤快速鍵。
提示
有問題嗎? 在 Exchange 的 Exchange Server 論壇中尋求協助 |Exchange Server |管理。
使用記事本設定用戶端特定的訊息大小限制
在記事本中開啟適當的 web.config 檔案。 例如,若要開啟 EWS 用戶端的 web.config 檔案,請執行下列命令:
Notepad %ExchangeInstallPath%ClientAccess\exchweb\ews\web.configNotepad %ExchangeInstallPath%FrontEnd\HttpProxy\ews\web.config如本主題稍早的數據表所述,在適當的 web.config 檔案中尋找相關密鑰。 例如,針對 EWS 用戶端,請在用戶端存取和後端中尋找 maxAllowedContentLength 密鑰 web.config 檔案,以及後端 web.config 檔案中所有 14 個值
maxReceivedMessageSize="67108864"實例。<requestLimits maxAllowedContentLength="67108864" /> ...maxReceivedMessageSize="67108864"...例如,若要允許Base64編碼的最大訊息大小約為64 MB,請將的所有實例
67108864變更為89478486(64*4/3*1048756) :<requestLimits maxAllowedContentLength="89478486" /> ...maxReceivedMessageSize="89478486"...當您完成時,請儲存並關閉 web.config 檔案。
使用下列其中一種方法重新啟動 Exchange 伺服器上的 IIS:
開啟 [IIS 管理員],選取伺服器,然後在 [ 動作 ] 窗格中,按兩下 [ 重新啟動]。
從提升許可權的命令提示字元 (命令提示字元視窗執行下列命令,方法是選取 [ 以系統管理員身 分執行]) :
net stop w3svc /ynet start w3svc
從命令行設定用戶端特定的訊息大小限制
您也可以從命令行設定用戶端特定的訊息大小限制,而不是使用記事本。 在 Exchange Server 上開啟提升許可權的命令提示字元 (您選取 [以系統 管理員 身分執行]) 開啟的 [命令提示字元] 視窗,然後針對您想要設定的限制執行適當的命令。
注意事項
命令中的大小值是預設值,因此您必須變更它們。
請注意值是以位元組或 KB 為單位。
ActiveSync
%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 服務
%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 網頁版
%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
如何知道這是否正常運作?
若要確認您已成功設定用戶端特定的郵件大小限制,您必須使用受影響的用戶端來回傳送測試訊息。 您可嘗試加入幾個小型附件或單一大型附件,以將測試郵件大小調整至約為設定值的 33%。 例如,若設定值為 85 MB,則實際的郵件大小上限約為 64 MB。