When sending larger messages via the ActiveSync service the message fails to send. Sending small emails works ok.
Some devices may return an error indicating that "The message that was sent to the server was rejected because the message was too large". Not all email clients may indicate the failure and could just keep the message in the outbox folder and keep retrying until removed from the folder.
A global IIS restriction preventing uploads larger than 49152 bytes. IIS sets a default value of 49152 bytes for the "UploadReadAheadSize" value which limits the amount of bytes allowed in the entity body of a request and the number of bytes a Web server will read into a buffer and pass to an ISAPI extension (which is how the ActiveSync service works).
2013-11-27 23:43:48 192.168.0.1 POST /Microsoft-Server-ActiveSync Userfirstname.lastname@example.org&DeviceId=ApplDMRL2W3PF185&DeviceType=iPad&Cmd=SmartForward 443 - 192.168.0.2 Apple-iPad3C4/1102.55400001 413 0 0 6396
2013-11-27 23:43:48 192.168.0.1 POST /Microsoft-Server-ActiveSync Useremail@example.com&DeviceId=ApplDMRL2W3PF185&DeviceType=iPad&Cmd=SendMail 443 - 19126.96.36.199 Apple-iPad3C4/1102.55400001 413 0 0 6396
The above log snippets report a 413 error in the line which indicates the "Request Entity is too large".
Also, IIS 7 and later have an upload limit of 30Mb, which limits the size that clients can post to the web server. To increase this you need to change the maxAllowedContentLength as described in the resolution below.
Open a Windows command prompt with administrator rights and navigate to the following location:
Run the following command:
cscript adsutil.vbs set w3svc/14/uploadreadaheadsize 51200000
Where "14" in the above command is the website ID.
Changing the maxAllowedContentLength can be done in the IIS manager. Select the MailEnable Protocols website (or if you are running ActiveSync under another site, select that site). Select the Request Filtering option by doubling clicking it when in the Features View. In the Actiions pane on the right side of the screen click the Edit Feature Settings... link. Edit the Maximum allowed content length (Bytes) value to the maximum you want to accept.
|Product:||MailEnable (ME-6.X Pro-Any Ent-Any)|
|Class:||TRB: Troubleshooting (Configuration or Environment)|
|Revised:||Thursday, November 18, 2021|