View Issue Details

IDProjectCategoryView StatusLast Update
0003505SOGoActiveSyncpublic2016-02-11 19:44
Reporteralzmich Assigned Toludovic  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Client] GoogleOSAndroidOS VersionLollipop (5.1.1)
Product Version2.3.7 
Summary0003505: attachments in 2nd Level (or deeper) subfolders are not synced / can't be downloaded
Description

attachments of e-mails in a subfolder at least 2nd level ( e.g INBOX / folder1 / folder2 ) can't be synced to the mobile.

mails with attachments in INBOX or INBOX/folder1 are not affected...

happens with current version 2.3.8 (couldn't select the 2.3.8 product version...)

Steps To Reproduce
  • create a 2nd Level Subfolder in your Mailbox (e. g. INBOX / folder1 / folder2)

  • place a mail with attachment into folder2.
    wait until the folderstructure and mail is synced to the android phone

  • open the mail in your android mail app (i think its gmail - not sure, the app is simple called "E-Mail" - in google apps)

  • try to download / open the attachment - in my case the real size displayed switches to 3 Bytes and is corrupted.

Additional Information

Thunderbird / SOGo Webinterface is not affected.

  • The "old" z-push system is also not affected, only the sogo-activesync
  • it happens with the current 2.3.8 release, as well the nightly (2.3) and 2.3.7 build.
  • placing the mail a folder higher (INBOX / folder1) - it works, as well as the top level folders like INBOX, Sent, Trash...

here is a debug request and response... - the part between <Data> shouldn't be (null) ;) - more the downloaded attachment ;)

  • our subfolder delimeter of the cyrus imap server is a "."

Feb 08 09:55:30 sogod [3310]: <0x0x7f38e5e920e8[SOGoActiveSyncDispatcher]> EAS - request for device androidXXXXXXXX: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<ItemOperations xmlns="ItemOperations:">
<Fetch>
<Store>Mailbox</Store>
<FileReference xmlns="AirSyncBase:">mail/attachmenttest%2Fsubfolder/2/1.2.2</FileReference>
</Fetch>
</ItemOperations>

Feb 08 09:55:31 sogod [3310]: <0x0x7f38e5e920e8[SOGoActiveSyncDispatcher]> EAS - response for device androidXXXXXXXX: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<ItemOperations xmlns="ItemOperations:">
<Status>1</Status>
<Response>
<Fetch>
<Status>1</Status>
<FileReference xmlns="AirSyncBase:">mail/attachmenttest/subfolder/2/1.2.2</FileReference>
<Properties>
<ContentType xmlns="AirSyncBase:">(null)/(null)</ContentType>
<Range>0--1</Range>
<Data>(null)</Data>
</Properties>
</Fetch>
</Response>
</ItemOperations>

Feb 08 09:55:31 sogod [3310]: |SOGo| request took 0.278958 seconds to execute

TagsNo tags attached.

Activities

ludovic

ludovic

2016-02-08 21:11

administrator   ~0009468

Try with 2.3.8.

alzmich

alzmich

2016-02-09 06:15

reporter   ~0009471

Unfortunately it happens also with 2.3.8

  • b38d638e716f09be5bc045bebf5a2a0c sogo_2.3.8-1_amd64.deb
  • 8bf49dd0e442a9c919015d61daec5c36 sogo-activesync_2.3.8-1_amd64.deb

as well as nightly builds from right now:

  • b581c58f4df1f7ae1ffcdab58251d26f sogo_2.3.8.20160208-1_amd64.deb
  • a8e0a33d27be6663f02487534af9624b sogo-activesync_2.3.8.20160208-1_amd64.deb

maybe to clearify, attachment download within the first folder structure like inbox, sent, trash works - but the subfolders or even deeper of them, like archives / 2015 / 12 and so on, don't.

alzmich

alzmich

2016-02-10 08:13

reporter   ~0009487

Hi,

ok, i digged a bit deeper in the code, did some bad hacking and got a hint.

  • it seems to be the IMAP delimiter of the folders.

The EAS Request we get is:
Feb 10 07:53:56 sogod [14999]: <0x0x561ba7c00e88[SOGoActiveSyncDispatcher]> EAS - request for device androidXXXXXXXX: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<ItemOperations xmlns="ItemOperations:">
<Fetch>
<Store>Mailbox</Store>
<FileReference xmlns="AirSyncBase:">mail/subfolder1%2Fsubfolder2/1/1.2.2</FileReference>
</Fetch>
</ItemOperations>

which seems to be the folder "subfolder1/subfolder2" - separated by a slash. - this submailbox does not exist, cause we separate by a dot ".", which is correct announced by the imap (cyrus) server.:

S[0x55cf0c588108]: ANNOTATION "subfolder1.subfolder2" "/comment" ("value.priv" "sogo-bppc56_80a_1c6a4dbc_1")
...
C[0x55cf0c290ea8]: 6 namespace
S[0x55cf0c50c698]:
NAMESPACE (("" ".")) (("Other Users." ".")) (("Shared Folders." "."))

I tested it by hard coding the subfolder1.subfolder2 into my local SOGoMailObject+ActiveSync.m File - only for tesing,
the request looks then:
...
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<ItemOperations xmlns="ItemOperations:">
<Fetch>
<Store>Mailbox</Store>
<FileReference xmlns="AirSyncBase:">mail/subfolder1.subfolder2/1/1.2.2</FileReference>
</Fetch>
</ItemOperations>

... and it worked, attachment got downloaded, as well as inline images displayed...

Because the webmail frontend is not affected, i think the problem is somewhere in the EAS Code - maybe it does not handle the imap delimiter, but uses hard a slash?

ludovic

ludovic

2016-02-11 19:44

administrator   ~0009512

Fixed in 3.0.2 and 2.3.9.

Related Changesets

sogo: master c9e7eac3

2016-02-11 14:33

ludovic


Details Diff
(fix) EAS issue with attachments in 2nd-level mailboxes (fixes 0003505) Affected Issues
0003505
mod - ActiveSync/SOGoActiveSyncDispatcher.m Diff File

sogo: v2 11a2bcff

2016-02-11 14:33

ludovic


Details Diff
(fix) EAS issue with attachments in 2nd-level mailboxes (fixes 0003505) Affected Issues
0003505
mod - ActiveSync/SOGoActiveSyncDispatcher.m Diff File

Issue History

Date Modified Username Field Change
2016-02-08 09:17 alzmich New Issue
2016-02-08 21:11 ludovic Severity major => minor
2016-02-08 21:11 ludovic Note Added: 0009468
2016-02-09 06:15 alzmich Note Added: 0009471
2016-02-10 08:13 alzmich Note Added: 0009487
2016-02-11 19:35 ludovic Changeset attached => sogo master c9e7eac3
2016-02-11 19:35 ludovic Assigned To => ludovic
2016-02-11 19:35 ludovic Resolution open => fixed
2016-02-11 19:35 ludovic Changeset attached => sogo v2 11a2bcff
2016-02-11 19:44 ludovic Note Added: 0009512
2016-02-11 19:44 ludovic Status new => resolved