6.0.0-beta1
7/16/25

[#12289] Attachments larger than 100k are missing from emails synced using ActiveSync
Summary Attachments larger than 100k are missing from emails synced using ActiveSync
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester software-horde (at) interfasys (dot) ch
Created 06/01/2013 (4428 days ago)
Due
Updated 06/04/2013 (4425 days ago)
Assigned 06/03/2013 (4426 days ago)
Resolved 06/04/2013 (4425 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/04/2013 05:06:38 AM Michael Rubinsky State ⇒ Resolved
 
06/04/2013 04:13:49 AM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit 23d8c3d52b7d49aa5ac76605f7bb1fa5c7b5f8f0
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue Jun 4 00:05:21 2013 -0400

     Use the correct truncation value for MIME messages.

     Bug: 12289

  .../lib/Horde/ActiveSync/Imap/Adapter.php          |   12 ++++++++----
  1 files changed, 8 insertions(+), 4 deletions(-)

http://git.horde.org/horde-git/-/commit/23d8c3d52b7d49aa5ac76605f7bb1fa5c7b5f8f0
06/04/2013 04:13:45 AM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit 7b292e69c535b15ff9409b6018446634542f62be
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue Jun 4 00:04:19 2013 -0400

     Always build the AIRSYNCBASE:Attachments structure, even for MIME 
messages.

     Partial fix for Bug: 12289

  .../lib/Horde/ActiveSync/Imap/Adapter.php          |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/7b292e69c535b15ff9409b6018446634542f62be
06/03/2013 05:42:38 PM Michael Rubinsky Comment #6
Priority ⇒ 2. Medium
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment
Things are done differently on Android as it calculates the size of 
the message only, not including the attachment.
Correct, because Android does not request the full MIME message (only 
the plaintext body), whereas BB is requesting the full MIME structure 
(AirSyncBase:Type value of 1 is plain text body, type or 4 is the full 
MIME structure). What's probably happening is I am truncating the MIME 
stream before sending it, which obviously breaks it. Instead, we 
probably need to send only the MIME headers in the stream data along 
with the WBXML attachment structure if the total size is greater than 
the requested MIMETruncation value.  I'll look into this further, the 
log helped.


06/03/2013 04:18:09 PM software-horde (at) interfasys (dot) ch Comment #5 Reply to this comment
A quick google search reveals numerous complaints about the Z10 and 
ActiveSync attachment behavior. I'll try to look into it more when I 
can, but it looks like a client issue.
I did a test on Android and the attachment was there.

Here is the debug info for the BB device:
2013-06-03T17:56:35+02:00 DEBUG: [87093] O     <Commands>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O      <Add>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O       <ServerEntryId>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        2630
2013-06-03T17:56:35+02:00 DEBUG: [87093] O       </ServerEntryId>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O       <Data>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:To>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         test@domain.com
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:To>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:From>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         sender@domain.com
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:From>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:Subject>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         log this
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:Subject>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:ThreadTopic>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         log this
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:ThreadTopic>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:DateReceived>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         2013-06-03T15:56:25.000Z
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:DateReceived>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:DisplayTo>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         Tester
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:DisplayTo>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:Importance>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         1
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:Importance>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:Read>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         0
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:Read>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:MessageClass>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         IPM.Note
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:MessageClass>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:Reply-To>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         sender@domain.com
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:Reply-To>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:InternetCPID>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         65001
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:InternetCPID>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <AirSyncBase:NativeBodyType>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         1
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         
</AirSyncBase:NativeBodyType>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <AirSyncBase:Body>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         <AirSyncBase:Type>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O          4
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         </AirSyncBase:Type>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         
<AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O          992526
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         
</AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         <AirSyncBase:Truncated>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O          1
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         </AirSyncBase:Truncated>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         <AirSyncBase:Data>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O          [STREAM]
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         </AirSyncBase:Data>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </AirSyncBase:Body>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:Flag/>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        <POOMMAIL:ContentClass>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O         urn:content-classes:message
2013-06-03T17:56:35+02:00 DEBUG: [87093] O        </POOMMAIL:ContentClass>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O       </Data>
2013-06-03T17:56:35+02:00 DEBUG: [87093] O      </Add>

It seems the message is truncated and it seems the limit is 200k, 
based on this:
2013-06-03T17:56:34+02:00 DEBUG: [87093] I  <Synchronize>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I   <Folders>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I    <Folder>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     <SyncKey>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       
{51a94d54-a5fc-4620-9a9d-61864e2e3851}64
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     </SyncKey>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     <FolderId>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       76adf6fb
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     </FolderId>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     <GetChanges />
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     <WindowSize>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       100
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     </WindowSize>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     <Options>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      <FilterType>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I        0
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      </FilterType>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      <MIMESupport>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I        2
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      </MIMESupport>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      <MIMETruncation>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I        7
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      </MIMETruncation>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      <AirSyncBase:BodyPreference>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       <AirSyncBase:Type>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I         4
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       </AirSyncBase:Type>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       <AirSyncBase:TruncationSize>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I         200000
2013-06-03T17:56:34+02:00 DEBUG: [87093] I       </AirSyncBase:TruncationSize>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I      </AirSyncBase:BodyPreference>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I     </Options>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I    </Folder>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I   </Folders>
2013-06-03T17:56:34+02:00 DEBUG: [87093] I  </Synchronize>

Things are done differently on Android as it calculates the size of 
the message only, not including the attachment.

2013-06-03T17:56:33+02:00 DEBUG: [89493] O     <Commands>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O      <Add>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O       <ServerEntryId>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        2630
2013-06-03T17:56:33+02:00 DEBUG: [89493] O       </ServerEntryId>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O       <Data>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:To>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         test@domain.com
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:To>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:From>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         sender@domain.com
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:From>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:Subject>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         log this
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:Subject>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:ThreadTopic>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         log this
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:ThreadTopic>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:DateReceived>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         2013-06-03T15:56:25.000Z
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:DateReceived>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:DisplayTo>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         Tester
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:DisplayTo>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:Importance>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         1
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:Importance>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:Read>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         0
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:Read>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:MessageClass>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         IPM.Note
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:MessageClass>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:Reply-To>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         sender@domain.com
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:Reply-To>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:InternetCPID>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         65001
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:InternetCPID>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <AirSyncBase:NativeBodyType>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         1
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         
</AirSyncBase:NativeBodyType>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <AirSyncBase:Body>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         <AirSyncBase:Type>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          1
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         </AirSyncBase:Type>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         
<AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          208
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         
</AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         <AirSyncBase:Data>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          Let's hope it works
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         </AirSyncBase:Data>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </AirSyncBase:Body>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <AirSyncBase:Attachments>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         <AirSyncBase:Attachment>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          <AirSyncBase:DisplayName>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           
WP01_Enterprise_Readiness_of_Consumer_Mobile_Platforms_120316US.pdf
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          </AirSyncBase:DisplayName>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           
<AirSyncBase:FileReference>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           INBOX:2630:2
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           
</AirSyncBase:FileReference>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          <AirSyncBase:Method>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           1
2013-06-03T17:56:33+02:00 DEBUG: [89493] O          </AirSyncBase:Method>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           
<AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           992318
2013-06-03T17:56:33+02:00 DEBUG: [89493] O           
</AirSyncBase:EstimatedDataSize>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         </AirSyncBase:Attachment>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </AirSyncBase:Attachments>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:Flag/>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        <POOMMAIL:ContentClass>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O         urn:content-classes:message
2013-06-03T17:56:33+02:00 DEBUG: [89493] O        </POOMMAIL:ContentClass>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O       </Data>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O      </Add>
2013-06-03T17:56:33+02:00 DEBUG: [89493] O     </Commands>


06/03/2013 03:10:30 PM software-horde (at) interfasys (dot) ch Comment #4 Reply to this comment
What do you mean by "missing"? I have no problems receiving 
attachments, of any size, on my devices. This has been available 
since email was originally implemented.
Email shows up without any attachment icon or attached file
Do the messages show on the device as *having* an attachment? EAS 
does not send the attachment data itself, only the fact that there 
is an attachment, on the initial SYNC. Later requests fetch the data 
if the user attempts to view/download the attachment. This is done 
in a variety of different ways, depending on the client and the 
version of EAS that is being used.
This has never worked for me on PlayBook OS 2.x, BB10.0 and BB10.1. 
With Horde 5.0 and now 5.1 (latest EAS version).
The email is received, only without the attachment icon.
The same email sent via IMAP is showing up fine, with everything included.

I'll try to test this on Android.
It could be that this is related to the other bug you posted, Bug: 
12292.  Without a sync log, it's impossible for me to tell.
I'll see what I can do

[Show Quoted Text - 12 lines]
OK. I wasn't sure what the default would be and what that setting 
would have been translated to in Horde
06/03/2013 03:00:23 PM Michael Rubinsky Comment #3 Reply to this comment
A quick google search reveals numerous complaints about the Z10 and 
ActiveSync attachment behavior. I'll try to look into it more when I 
can, but it looks like a client issue.
06/01/2013 03:45:57 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
What do you mean by "missing"? I have no problems receiving 
attachments, of any size, on my devices. This has been available since 
email was originally implemented.

Do the messages show on the device as *having* an attachment? EAS does 
not send the attachment data itself, only the fact that there is an 
attachment, on the initial SYNC. Later requests fetch the data if the 
user attempts to view/download the attachment. This is done in a 
variety of different ways, depending on the client and the version of 
EAS that is being used.

It could be that this is related to the other bug you posted, Bug: 
12292.  Without a sync log, it's impossible for me to tell.
Could it be that maxRequestLength has not been set or set to a very 
low value?
There is no such configuration for Horde or PHP. This is an Exchange 
server configuration, not an ActiveSync policy. There is a 
MaxAttachmentSize policy that is enforced on the client if 
provisioning is enabled - but that defaults to 5MB and can be 
configured higher by an admin. Though this doesn't prevent the 
attachment information from being sent to the device, it only prevents 
the device from fetching the full attachment.

06/01/2013 03:37:33 PM Michael Rubinsky Priority ⇒ 1. Low
Version ⇒ Git master
 
06/01/2013 02:15:52 AM software-horde (at) interfasys (dot) ch Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Synchronization
Summary ⇒ Attachments larger than 100k are missing from emails synced using ActiveSync
Type ⇒ Bug
Priority ⇒ 3. High
Reply to this comment
This was a problem on Horde 5.0 already and I wrongly assumed that it 
was simply not implemented, but after having performed various tests 
on 5.1, I'm convinced that the ActiveSync component has a problem with 
attachments.

Any attachment above 100k (roughly) is stripped out of the message 
being sent to the device.
The same device using IMAP can see all the attachments.

Could it be that maxRequestLength has not been set or set to a very low value?

Tested on BlackBerry 10 devices using OS 10.1.

Supported Microsoft ActiveSync Features and Policies for use with 
BlackBerry 10
http://btsc.webapps.blackberry.com/btsc/viewdocument.do?externalId=KB33619&sliceId=2&cmd=displayKC&docType=kc&noCount=true&ViewedDocsListHelper=com.kanisa.apps.common.BaseViewedDocsListHelperImpl

Saved Queries