View Issue Details

IDProjectCategoryView StatusLast Update
0003268SOGoActiveSyncpublic2015-07-22 13:19
Reporterdaniel.colchete Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Server] LinuxOSDebianOS Version7 (Wheezy)
Product Version2.3.0 
Fixed in Version2.3.1 
Summary0003268: Folder duplication when IMAP namespaces are in use
Description

Here on my server we are using Dovecot 2.2.18, but a few years ago we migrated from courier-imap. Following the procedure defined at http://wiki2.dovecot.org/Migration/Courier we activated a default IMAP namespace so that users won't have to re-sync terabytes of mailboxes all over again. It worked.

When working on integration problems with ActiveSync and Android I found out that FolderSync was sending duplicate references of the Trash, Draft and Sent mailboxes. Up until Android Jelly Beans it would just display duplicate folders, with Kit Kat and Lollipop it wont accept that and display an incorrect list of available mailbox folders, making the user miss a lot of mail messages. Also Lollipop won't process folders for Calendars and Contacts.

EASDebugLog example: http://pastebin.com/CrD6gmGh and http://pastebin.com/XMb19rPK.

Fixing this bug was one of the necessary steps I had to make here to make ActiveSync work on Lollipop in my case. I'm going to report other bugs with the other things I had to change to make SOGo's ActiveSync work with Lollipop in my case.

Steps To Reproduce

1 - Set up a new Dovecot with a default namespace enabled.
2 - Set up a new SOGo with EAS enabled.
3 - Wipe an Android Lollipop device (I used the Android Virtual Device Manager)
4 - Set up an account and wait for it to finish syncing.

Additional Information

I created an work-arround the bug here with the following patch:

diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m
index 83314be..e82ec95 100644
--- a/ActiveSync/SOGoActiveSyncDispatcher.m
+++ b/ActiveSync/SOGoActiveSyncDispatcher.m
@@ -704,6 +704,7 @@ static BOOL debugOn = NO;
SOGoCacheGCSObject o;
id currentFolder;
NSData
d;

  • NSMutableDictionary *processedFolders;

    int status, command_count, i, type, fi, count;

@@ -849,6 +850,8 @@ static BOOL debugOn = NO;
}
}

  • processedFolders = [NSMutableDictionary dictionary];
    // Handle addition and changes
    for (i = 0; i < [allFoldersMetadata count]; i++)
    {
    @@ -862,7 +865,11 @@ static BOOL debugOn = NO;

    serverId = [NSString stringWithFormat: @"mail/%@", [[imapGUIDs objectForKey: nameInCache] substringFromIndex: 6]];
    name = [folderMetadata objectForKey: @"displayName"];

  • if ([[processedFolders objectForKey:serverId] intValue] == 42)
  • continue;
  • [processedFolders setObject:[NSNumber numberWithInt:42] forKey:serverId];
  • if ([name hasPrefix: @"/"])
    name = [name substringFromIndex: 1];

Why 42? Because it is the "Answer to the Ultimate Question of Life, The Universe, and Everything".

On my MySQL database the folder list is not duplicated. sogo-tool and the web interfaces will also show a correct folder list.

Config file at the time: http://pastebin.com/71jy2zZC

TagsNo tags attached.

Activities

daniel.colchete

daniel.colchete

2015-06-25 08:52

reporter   ~0008674

I have been discussing the problem on the mailing list. The first message of the thread is here: https://lists.inverse.ca/sogo/arc/users/2015-06/msg00282.html.

ludovic

ludovic

2015-07-22 13:19

administrator   ~0008743

https://github.com/inverse-inc/sogo/commit/3a61b7bae49dc750ab20001dbe9ce12de654d382

Issue History

Date Modified Username Field Change
2015-06-25 08:47 daniel.colchete New Issue
2015-06-25 08:52 daniel.colchete Note Added: 0008674
2015-07-22 13:19 ludovic Note Added: 0008743
2015-07-22 13:19 ludovic Status new => resolved
2015-07-22 13:19 ludovic Fixed in Version => 2.3.1
2015-07-22 13:19 ludovic Resolution open => fixed
2015-07-22 13:19 ludovic Assigned To => ludovic