適用於:
2016
2019
訂閱版本
在 Exchange Server 中,有幾種不同的郵件大小限制適用於郵件通過組織的傳輸。 如需詳細資訊,請參閱 Exchange Server 中的郵件大小和收件者限制。
不過,您可以針對先前稱為 Outlook Web App) 的 Outlook 網頁版 (,以及使用 Exchange ActiveSync 或 Exchange Web 服務 (EWS) 的電子郵件用戶端設定用戶端特定的郵件大小限制。 如果您變更 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" |
KB |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
maxAllowedContentLength="30000000 bytes" (預設不存在;查看註解) |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
maxRequestLength="10240" |
KB |
| 後端 | %ExchangeInstallPath%ClientAccess\Sync\web.config |
<add key="MaxDocumentDataSize" value="10240000"> |
位元組 |
關於 ActiveSync 限制的註解
根據預設,ActiveSync 的檔案中web.config沒有 maxAllowedContentLength 機碼。 不過,ActiveSync 的郵件大小上限會受到套用至伺服器上所有網站的 maxAllowedContentLength 值影響。 預設值為 30000000 位元組。 若要在 IIS 管理員中查看信箱伺服器上的 ActiveSync 這些值,請執行下列步驟:
執行下列其中一個步驟:
針對前端) 網站的用戶端存取 (,請開啟 IIS 管理員,瀏覽至 [網站>預設網站 ],然後選取 [Microsoft-Server-ActiveSync]。
對於後端網站,請開啟 [IIS 管理員],瀏覽至 [網站>]、[交換後端 ],然後選取 [Microsoft-Server-ActiveSync]。
確認已選取底部的 [功能檢視] 索引標籤,然後按兩下 [管理] 區段中的 [組態編輯器]。
按一下 區段 欄位中的下拉箭頭,瀏覽至 system.webServer>安全性 ,然後選取 requestFiltering。
在結果中,展開 requestLimits,您會看到 maxAllowedContentLength 和預設值 30000000 (位元組) 。
若要變更 maxAllowedContentLength 值,請輸入以位元組為單位的新值,然後按一下 [套用]。 您需要變更用戶端存取網站和後端網站上的值。
注意:您可以在 [網站>預設網站>] 的 [網站預設網站]Microsoft-Server-ActiveSync 或 [網站>交換後端>]Microsoft-Server-ActiveSync 的 IIS 管理員中變更相同的設定,然後在 [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 |
針對不同 HTTP/HTTPS 繫結和驗證方法組合的 14 個執行個體 maxReceivedMessageSize="67108864" () |
位元組 |
關於 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" |
KB |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
maxAllowedContentLength="35000000" |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
maxRequestLength="35000" |
KB |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
2 個 HTTP 和 HTTPS 繫結的 (執行個體 maxReceivedMessageSize="35000000") |
位元組 |
| 後端 | %ExchangeInstallPath%ClientAccess\Owa\web.config |
2 個 HTTP 和 HTTPS 繫結的 (執行個體 maxStringContentLength="35000000") |
位元組 |
對 Outlook 網頁版限制的註解
- 在後端
web.config檔案中,有一個您不需要修改的 MsOnlineShellService 繫結值maxStringContentLength="102400"實例。
開始之前有哪些須知?
預估完成時間:15 分鐘
Exchange 權限無法套用於此主題的程序。 這些程序是在 Exchange 伺服器的作業系統中加以執行。
您儲存至 web.config 設定檔的變更會在您重新啟動 IIS 之後套用。
若要允許 Base64 編碼導致大小增加 33%,請將您想要的新最大大小值乘以 4/3 將值轉換為 KB (乘以 1024)。 若要將值轉換為位元組,請乘以1048756 (1024*1024) 。 請注意,Base64 編碼所造成的大小增加可能會超過 33%,並取決於數個因素 (例如,附件大小、檔案類型、壓縮和電子郵件用戶端) 。
您在 Exchange 伺服器上的 Exchange XML 應用程式組態檔中所做的任何自訂 Exchange 或 Internet Information Server (IIS () 設定,例如,web.config 檔案或 EdgeTransport.exe.config 檔案) ,都會在安裝 Exchange CU 時覆寫。 請務必儲存此資訊,以便在安裝後輕鬆重新套用設定。 安裝 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 用戶端,請在用戶端存取與後端 web.config 檔中尋找 maxAllowedContentLength 機碼,並在後端 web.config 檔中尋找值
maxReceivedMessageSize="67108864"的所有 14 個執行個體。<requestLimits maxAllowedContentLength="67108864" /> ...maxReceivedMessageSize="67108864"...例如,若要允許 Base64 編碼的郵件大小上限約為 64 MB,請將
6710886489478486所有執行個體變更為 (64*4/3*1048756) :<requestLimits maxAllowedContentLength="89478486" /> ...maxReceivedMessageSize="89478486"...完成後,請儲存並關閉 web.config 檔案。
使用下列其中一種方法,在 Exchange 伺服器上重新啟動 IIS:
開啟 [IIS 管理員],選取伺服器,然後在 [動作 ] 窗格中按一下 [ 重新啟動]。
從提升權限的命令提示字元 (您選取 [ 以系統管理員身分執行 ] 開啟的命令提示字元視窗執行下列命令) :
net stop w3svc /ynet start w3svc
從命令列設定用戶端特定的郵件大小限制
您也可以從命令列設定用戶端特定的郵件大小限制,而不是使用記事本。 在 Exchange 伺服器上開啟提升權限的命令提示字元 (您開啟的命令提示字元視窗,方法是選取 [以 系統管理員身分執行 ]) ,然後針對您想要設定的限制執行適當的命令。
注意事項
命令中的大小值是預設值,因此您必須加以變更。
請注意該值是以位元組為單位還是以千位元組為單位。
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。