View Issue Details

IDProjectCategoryView StatusLast Update
0006163SOGoActiveSyncpublic2025-11-28 13:10
ReporterLars Assigned Toqhivert  
PrioritynormalSeveritycrashReproducibilityhave not tried
Status feedbackResolutionopen 
Product Version5.12.3 
Summary0006163: ActiveSync deletes unsynced calendar events on Android
Description

I've been using SOGo for the past years as part of the mailcow package for family and friends, and for the past few weeks, our android calendars are wreaking havoc. New events do not reach the online calendar, but get deleted on the next sync. This problem only happens on Android, and with different Android apps (tested Etar as well as Google Calendar).

In both apps, the calendar events suddenly disappear (completely, including the ones that are on the server) and are then re-synced - overwriting the local storage and wiping out any events. This happens for the primary users calendar as well as shared calendars of other users.

The SOGo version packaged is 5.12.3, and it seems that the ActiveSyncDispatcher decides to send an erroneous push-content command to the client (username and clientIP was replaced for privacy reasons), before the events from the Android device can be properly synced.

Nov 28 09:27:51 82a45ece1c0c sogod [53]: <0x0x560ff9851550[WOHttpAdaptor]> notified the watchdog that we are ready
[...]
Nov 28 09:28:38 82a45ece1c0c sogod [53]: <0x0x560ff96b1b60[SOGoCache]> Cache cleanup interval set every 900.000000 seconds
Nov 28 09:28:38 82a45ece1c0c sogod [53]: <0x0x560ff96b1b60[SOGoCache]> Using host(s) 'memcached' as server(s)
Nov 28 09:28:38 82a45ece1c0c sogod [54]: <0x0x560ff9deccb0[NGImap4Client]> Note: no key found for sorting, using 'DATE': (null)
Nov 28 09:28:39 82a45ece1c0c sogod [53]: <0x0x560ff9cb8db0[SOGoWebDAVAclManager]> entry '{DAV:}write' already exists in DAV permissions table
Nov 28 09:28:39 82a45ece1c0c sogod [53]: <0x0x560ff9cb8db0[SOGoWebDAVAclManager]> entry '{DAV:}write-properties' already exists in DAV permissions table
Nov 28 09:28:39 82a45ece1c0c sogod [53]: <0x0x560ff9cb8db0[SOGoWebDAVAclManager]> entry '{DAV:}write-content' already exists in DAV permissions table
Nov 28 09:28:39 82a45ece1c0c sogod [53]: <0x0x560ff9a349b0[SOGoActiveSyncDispatcher]> Sleeping 45 seconds while detecting changes for user user0@domain1.tld in Ping...
[...]
Nov 28 09:29:25 82a45ece1c0c sogod [53]: <0x0x560ff9a349b0[SOGoActiveSyncDispatcher]> Sleeping 45 seconds while detecting changes for user user0@domain1.tld in Ping...
Nov 28 09:29:38 82a45ece1c0c sogod [9]: [WARN] <0x0x560ff9958290[WOWatchDogChild]> pid 53 has been hanging in the same request for 1 minutes
[...]
Nov 28 09:30:10 82a45ece1c0c sogod [53]: <0x0x560ff9a349b0[SOGoActiveSyncDispatcher]> Change detected using Ping, we let the EAS client know to send a Sync.
Nov 28 09:30:10 82a45ece1c0c sogod [53]: [ERROR] <0x0x560ff9837580[WOHttpTransaction]> client disconnected during delivery of response for <WORequest[0x0x560ff9596c00]: method=POST uri=/SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android app=SOGo rqKey=Microsoft-Server-ActiveSync rqPath=(null)> (len=51): the socket was shutdown
Nov 28 09:30:10 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 51/327 91.502 - - 9M - 12
Nov 28 09:30:11 82a45ece1c0c sogod [53]: <0x0x560ff965f1a0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:11 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 542/94 0.628 - - 684K - 13
Nov 28 09:30:12 82a45ece1c0c sogod [53]: <0x0x560ff96e34a0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:12 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 77/59 0.079 - - 0 - 13
Nov 28 09:30:12 82a45ece1c0c sogod [53]: <0x0x560ff9cbd4c0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:12 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 4858/94 0.450 - - 928K - 13
Nov 28 09:30:13 82a45ece1c0c sogod [53]: <0x0x560ff9cbccb0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:13 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 75/57 0.040 - - 0 - 13
Nov 28 09:30:14 82a45ece1c0c sogod [53]: <0x0x560ff9c90110[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:14 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 5038/92 0.505 - - 4M - 13
Nov 28 09:30:15 82a45ece1c0c sogod [53]: <0x0x560ff9d56120[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:15 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 2761/100 0.368 - - 792K - 13
Nov 28 09:30:16 82a45ece1c0c sogod [53]: <0x0x560ff9867b20[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:16 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 76/58 0.058 - - 0 - 13
Nov 28 09:30:17 82a45ece1c0c sogod [53]: <0x0x560ff9c83ea0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:17 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 554/93 0.185 - - 0 - 13
Nov 28 09:30:17 82a45ece1c0c sogod [53]: <0x0x560ff9a1e160[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:17 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 73/55 0.029 - - 0 - 13
Nov 28 09:30:18 82a45ece1c0c sogod [53]: <0x0x560ff97249e0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Nov 28 09:30:18 82a45ece1c0c sogod [53]: 11.22.33.44 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=user0%40domain1.tld&DeviceId=androidc111111111&DeviceType=Android HTTP/1.0" 200 4387/90 0.312 - - 0 - 13
Nov 28 09:30:21 82a45ece1c0c sogod [53]: <0x0x560ff9d9e240[SOGoActiveSyncDispatcher]> Sleeping 45 seconds while detecting changes for user user0@domain1.tld in Ping...
[...]

I see messages like this all over the place.

This behavior is also consistent across different Android devices and versions.

The update to 5.12.3 happened in October, and the problems have started appearing then. Config-wise, SOGoURLEncryption was enabled, no other sogo changes that I can see from the changelog:

file: /var/lib/sogo/GNUstep/Defaults/sogod.plist

&lt;key>SOGoURLEncryptionEnabled&lt;/key>
&lt;string>YES&lt;/string>
&lt;key>SOGoURLEncryptionPassphrase&lt;/key>
&lt;string>${SOGO_URL_ENCRYPTION_KEY}&lt;/string>

(source: https://github.com/mailcow/mailcow-dockerized/compare/2025-09b...2025-09c#diff-68f6a9b5f4588a9c9597d782de654b22e2dbbd62f8f36f9e6699226a3906adabR53-R56 )

Since this problem started to occur, the calendars have become effectively unusable on Android devices.

Additional Information
  • The dockerized SOGo runs on a VM on a libvirt host with its own public IP. I've added the sogo-mailcow.conf.log for reference.
  • it's consistent on multiple android devices on multiple networks and android versions, across different applications - all devices use the EXCHANGE account type. It does NOT happen via IMAP on thunderbird.
  • I did notice that my Android calendar did not show the whole account every now and then - only a manual sync via the android settings -> account did make it re-appear.
TagsNo tags attached.

Activities

Lars

Lars

2025-11-28 10:35

reporter  

sogo-mailcow-conf.log (3,079 bytes)   
{
    SOGoCalendarDefaultRoles = (
        PublicViewer,
        ConfidentialDAndTViewer,
        PrivateDAndTViewer
    );

    WOWorkersCount = "20";
    SOGoACLsSendEMailNotifications = YES;
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoDraftsFolderName = "Drafts";
    SOGoJunkFolderName= "Junk";
    SOGoMailDomain = "sogo.local";
    SOGoEnableEMailAlarms = YES;
    SOGoMailHideInlineAttachments = YES;
    SOGoFoldersSendEMailNotifications = YES;
    SOGoForwardEnabled = YES;

    // Added with SOGo 5.12 - Allows users to cleanup there maildirectories by deleting mails oder than X
    SOGoEnableMailCleaning = YES;

    // Fixes "MODIFICATION_FAILED" error (HTTP 412) in Clients when accepting invitations from external services
    SOGoDisableOrganizerEventCheck = YES;

    // Option to set Users as admin to globally manage calendar permissions etc. Disabled by default
    // SOGoSuperUsernames = ("moo@example.com");

    SOGoUIAdditionalJSFiles = (
      js/theme.js,
      js/custom-sogo.js
    );

    SOGoEnablePublicAccess = YES;

    // Multi-domain setup
    // Domains are isolated, you can define visibility options here.
    // Example:

    // SOGoDomainsVisibility = (
    //  (domain1.tld, domain5.tld),
    //  (domain3.tld, domain2.tld)
    // );

    // self-signed is not trusted anymore
    WOPort = "0.0.0.0:20000";
    SOGoMemcachedHost = "memcached";

    SOGoLanguage = English;
    SOGoMailAuxiliaryUserAccountsEnabled = YES;
    // SOGoCreateIdentitiesDisabled = NO;
    SOGoMailCustomFromEnabled = YES;
    SOGoMailingMechanism = smtp;
    SOGoSMTPAuthenticationType = plain;

    SxVMemLimit = 384;

    SOGoMaximumPingInterval = 3540;

    SOGoInternalSyncInterval = 45;

    SOGoMaximumSyncInterval = 3540;

    // 100 seems to break some Android clients
    //SOGoMaximumSyncWindowSize = 99;
    // This should do the trick for Outlook 2016
    SOGoMaximumSyncResponseSize = 512;

    WOWatchDogRequestTimeout = 360;

    WOListenQueueSize = 16;
    WONoDetach = YES;

    SOGoIMAPAclConformsToIMAPExt = Yes;
    SOGoPageTitle = "SOGo Groupware";
    SOGoFirstDayOfWeek = "1";

    SOGoSieveFolderEncoding = "UTF-8";
    SOGoPasswordChangeEnabled = NO;
    SOGoSentFolderName = "Sent";
    SOGoMailShowSubscribedFoldersOnly = NO;
    NGImap4ConnectionStringSeparator = "/";
    SOGoSieveScriptsEnabled = YES;
    SOGoTrashFolderName = "Trash";
    SOGoVacationEnabled = YES;

    SOGoCacheCleanupInterval = 900;
    SOGoMaximumFailedLoginCount = 10;
    SOGoMaximumFailedLoginInterval = 900;
    SOGoFailedLoginBlockInterval = 900;

    GCSChannelCollectionTimer = 60;
    GCSChannelExpireAge = 60;

    MySQL4Encoding = "utf8mb4";
  //SOGoDebugRequests = YES;
  //SoDebugBaseURL = YES;
  //ImapDebugEnabled = YES;

    // Enabled debug log for further checks
    // 2025-11-28 LK
    //SOGoEASDebugEnabled = YES;

  SOGoEASSearchInBody = YES;
  //LDAPDebugEnabled = YES;
  //PGDebugEnabled = YES;
  //MySQL4DebugEnabled = YES;
  //SOGoUIxDebugEnabled = YES;
  //WODontZipResponse = YES;
    WOLogFile = "/dev/sogo_log";
}
sogo-mailcow-conf.log (3,079 bytes)   
Lars

Lars

2025-11-28 10:45

reporter   ~0018381

  • I've also tried completely deleting the account and re-adding it, same behavior
Lars

Lars

2025-11-28 11:03

reporter   ~0018382

Temporary Workaround:

  • disable calendar synchronization in the android account settings
  • install DAVx5 from f-droid and use it for synchronization.

-> circumvents ActiveSync

qhivert

qhivert

2025-11-28 13:10

administrator   ~0018383

Hello,
Nothing wrong from the log.
The ERROR is that your app has closed the connection for whatever reason. The sync command answer with data, sometimes not.

Could you add this:
SOGoDebugRequests = YES;
SOGoEASDebugEnabled = YES;
And give me the log after trying to sync the events?

It will print all ActiveSync message so you will see what android asks and what sogo answers. But be careful, in print all datas, includings the content of your events/mails...

So either do test with useless event/data, or censor the data on the log or send me the log privately to my mail that you know.

Issue History

Date Modified Username Field Change
2025-11-28 10:35 Lars New Issue
2025-11-28 10:35 Lars File Added: sogo-mailcow-conf.log
2025-11-28 10:45 Lars Note Added: 0018381
2025-11-28 11:03 Lars Note Added: 0018382
2025-11-28 13:10 qhivert Note Added: 0018383
2025-11-28 13:10 qhivert Assigned To => qhivert
2025-11-28 13:10 qhivert Status new => feedback