Kopano - Syncing events older than 2 weeks

Moin!

I’m using Kopano with z-push. When syncing the calendar with my phone (Android) via z-push I never get events older than 2 weeks.
It doesn’t seem to be a problem with googles exchange client. When syncing with my retired Zafara server via z-push I get all events. I’m sure I changed something in z-push on my Zarafa server many years ago but I cant remember what and cant find it on the internet.

Any hints?

Cheers

Hi @owei,

normally this is more of a client side setting/limitation. Within Z-Push there is a setting to limit the amount to be synced to mobile devices (see https://stash.z-hub.io/projects/ZP/repos/z-push/browse/src/config.php#158-166), but by default its not limited.

Hallo @fbartels,

I didn’t change the default setting “define(‘SYNC_FILTERTIME_MAX’, SYNC_FILTERTYPE_ALL);”.

Why does my phone sync all events from one server and not from the other one by using the same exchange client? There must be a difference between the servers.

Events from my UCS-server disappear on my phone when they’re older than 2 weeks. That also happens on my wifes phone.

I compared /usr/share/z-push/config.php on both servers and there’s no difference.

It makes my sick, knowing I changed something years ago without documenting it or finding it again.

Cheers

Like I said this is more likely a client setting. Maybe your client has changed default values since you originally set up the other server? Or you changed it afterwards on the phone for that account?

Nine has for example a setting for that.

This just proves that you must have changed something on your phone, (almost) every other file would have been overwritten by updates.

I deleted all the exchange accounts on my phone and created them new. One account for my old and one for my new server.
I don’t think it’s the client.

Hi, just to be sure I have checked in with our developers and they also agree that the two weeks limitation is most probably a client setting.

To make sure that this is the case you could enable wbxml logging for that user and then inspect the sync request (for this you will likely need to remove the account and create it anew). In the sync request you will then see the filtertype requested by the device.

Hi, I’ll try that and will report the results.

What exact are we looking for in z-push.log?

You have to first retrieve the FolderID. This is printed during the foldersync command.

13/11/2018 10:52:07 [ 7374] [DEBUG] ASDevice->GetFolderIdForBackendId(): generated new folderid 'Ue9004' for backend-folderid '8077f3d0b01f4175aad24676f2b7c867e20200000000'
13/11/2018 10:52:07 [ 7374] [DEBUG] HierarchyCache: AddFolder() serverid: Ue9004 displayname: Calendar

Afterwards you can look for this FolderID in the rest of the logging. This is the sync request for the calendar folder of a testing device (the request is incoming - e.g. coming from the device - as indicated by the “I”)

13/11/2018 10:52:13 [ 7374] [DEBUG] ZPush::CommandNeedsPlainInput(0): false
13/11/2018 10:52:13 [ 7374] [WBXML] I  <Synchronize>
13/11/2018 10:52:13 [ 7374] [WBXML] I   <Folders>
13/11/2018 10:52:13 [ 7374] [WBXML] I    <Folder>
13/11/2018 10:52:13 [ 7374] [WBXML] I     <SyncKey>
13/11/2018 10:52:13 [ 7374] [WBXML] I      {ed9a167b-d4c2-4e20-b0d0-17404cceadbf}1
13/11/2018 10:52:13 [ 7374] [WBXML] I     </SyncKey>
13/11/2018 10:52:13 [ 7374] [WBXML] I     <FolderId>
13/11/2018 10:52:13 [ 7374] [WBXML] I      Ue9004
13/11/2018 10:52:13 [ 7374] [WBXML] I     </FolderId>
13/11/2018 10:52:13 [ 7374] [DEBUG] FileStateMachine->GetState() read '737' bytes from file: '/var/lib/z-push/1/3/4e696e65303939343442394344464231-ed9a167b-d4c2-4e20-b0d0-17404cceadbf-fd'
13/11/2018 10:52:13 [ 7374] [DEBUG] SyncParameters->UseCPO('DEFAULT')
13/11/2018 10:52:13 [ 7374] [DEBUG] DeviceManager->GetBackendIdForFolderId(): folderid Ue9004 => 8077f3d0b01f4175aad24676f2b7c867e20200000000
13/11/2018 10:52:13 [ 7374] [DEBUG] SyncCollections->AddCollection(): Folder id 'Ue9004' : ref. PolicyKey '170795774', ref. Lifetime '', last sync at '1542102733'
13/11/2018 10:52:13 [ 7374] [DEBUG] SyncCollections->AddCollection(): Updated reference PolicyKey '170795774', reference Lifetime '', Last sync at '1542102733'
13/11/2018 10:52:13 [ 7374] [WBXML] I     <DeletesAsMoves>
13/11/2018 10:52:13 [ 7374] [WBXML] I      1
13/11/2018 10:52:13 [ 7374] [WBXML] I     </DeletesAsMoves>
13/11/2018 10:52:13 [ 7374] [WBXML] I     <GetChanges>
13/11/2018 10:52:13 [ 7374] [WBXML] I      1
13/11/2018 10:52:13 [ 7374] [WBXML] I     </GetChanges>
13/11/2018 10:52:13 [ 7374] [WBXML] I     <WindowSize>
13/11/2018 10:52:13 [ 7374] [WBXML] I      8
13/11/2018 10:52:13 [ 7374] [WBXML] I     </WindowSize>
13/11/2018 10:52:13 [ 7374] [WBXML] I     <Options>
13/11/2018 10:52:13 [ 7374] [WBXML] I      <FilterType>
13/11/2018 10:52:13 [ 7374] [DEBUG] SyncParameters->UseCPO('DEFAULT')
13/11/2018 10:52:13 [ 7374] [WBXML] I       4
13/11/2018 10:52:13 [ 7374] [WBXML] I      </FilterType>
13/11/2018 10:52:13 [ 7374] [WBXML] I      <Conflict>
13/11/2018 10:52:13 [ 7374] [WBXML] I       1
13/11/2018 10:52:13 [ 7374] [WBXML] I      </Conflict>
13/11/2018 10:52:13 [ 7374] [WBXML] I      <AirSyncBase:BodyPreference>
13/11/2018 10:52:13 [ 7374] [WBXML] I       <AirSyncBase:Type>
13/11/2018 10:52:13 [ 7374] [WBXML] I        1
13/11/2018 10:52:13 [ 7374] [WBXML] I       </AirSyncBase:Type>
13/11/2018 10:52:13 [ 7374] [WBXML] I       <AirSyncBase:TruncationSize>
13/11/2018 10:52:13 [ 7374] [WBXML] I        20480
13/11/2018 10:52:13 [ 7374] [WBXML] I       </AirSyncBase:TruncationSize>
13/11/2018 10:52:13 [ 7374] [WBXML] I       <AirSyncBase:AllOrNone>
13/11/2018 10:52:13 [ 7374] [WBXML] I        0
13/11/2018 10:52:13 [ 7374] [WBXML] I       </AirSyncBase:AllOrNone>
13/11/2018 10:52:13 [ 7374] [WBXML] I      </AirSyncBase:BodyPreference>
13/11/2018 10:52:13 [ 7374] [WBXML] I     </Options>
13/11/2018 10:52:13 [ 7374] [WBXML] I    </Folder>
13/11/2018 10:52:13 [ 7374] [DEBUG] HandleSync(): FilterType has changed (old: '', new: '4'), removing folderstat to force Exporter setup
13/11/2018 10:52:13 [ 7374] [WBXML] I   </Folders>
13/11/2018 10:52:13 [ 7374] [WBXML] I  </Synchronize>

The explanation of the possible values of FilterType can be found at https://msdn.microsoft.com/en-us/library/gg709713(v=exchg.80).aspx. This device requests a FilterType of 4, which means “two weeks”.

I created a new user on Kopano with two calendar events (October 3 and November 13).

After that I created an exchange account on my phone and here are the results of syncing (folderid for the calender is Ud4d68):

13/11/2018 13:00:19 [ 2643] [DEBUG] [test] -------- Start
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] cmd='Sync' devType='Android' devId='androidc259103399' getUser='test' from='91.16.124.153' version='2.4.4+0-0' method='POST'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Used timezone 'Europe/Amsterdam'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::GetBackend(): trying autoload backend 'BackendKopano'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] BackendKopano using PHP-MAPI version: 8.6.2 - PHP version: 7.0.27-0+deb9u1
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Request::ProcessHeaders() ASVersion: 14.1
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::CommandNeedsProvisioning(0): true
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->GetState() read '20712' bytes from file: '/var/lib/z-push/9/9/androidc259103399-devicedata'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ASDevice data loaded for user: 'test'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] TopCollector(): Initialized mutexid Resource id #18 and memid Resource id #19.
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] TopCollector initialised with IPC provider 'IpcSharedMemoryProvider' with type '20'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] LoopDetection(): Initialized mutexid Resource id #22 and memid Resource id #23.
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] LoopDetection initialised with IPC provider 'IpcSharedMemoryProvider' with type '1337'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::HierarchyCommand(0): false
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->ProvisioningRequired('442565253') saved device key '442565253': false
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->getPolicyName(): determined policy name: 'default'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->getProvisioningPolicies(): loaded 'default' policy.
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::CommandNeedsAuthentication(0): true
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] KopanoBackend->Logon(): Trying to authenticate user 'test'..
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] KopanoBackend->openMessageStore('test'): Found 'DEFAULT' store: 'Resource id #34'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] KopanoBackend->Logon(): User 'test' is authenticated
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Store supports properties containing Unicode characters.
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::CommandNeedsPlainInput(0): false
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I  <Synchronize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I   <Folders>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I    <Folder>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <SyncKey>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      {2a546d96-7c8b-4a15-9df5-090f9b7ae460}1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     </SyncKey>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <FolderId>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      Ud4d68
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     </FolderId>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->GetState() read '737' bytes from file: '/var/lib/z-push/9/9/androidc259103399-2a546d96-7c8b-4a15-9df5-090f9b7ae460-fd'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncParameters->UseCPO('DEFAULT')
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->GetBackendIdForFolderId(): folderid Ud4d68 => d3cebb4b355848d589969ff20440b6ee7b4100000000
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncCollections->AddCollection(): Folder id 'Ud4d68' : ref. PolicyKey '442565253', ref. Lifetime '', last sync at '1542110419'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncCollections->AddCollection(): Updated reference PolicyKey '442565253', reference Lifetime '', Last sync at '1542110419'
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <DeletesAsMoves/>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <GetChanges/>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <WindowSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      10
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     </WindowSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     <Options>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      <FilterType>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncParameters->UseCPO('DEFAULT')
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I       4
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      </FilterType>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      <AirSyncBase:BodyPreference>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I       <AirSyncBase:Type>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I        1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I       </AirSyncBase:Type>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I       <AirSyncBase:TruncationSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I        200000
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I       </AirSyncBase:TruncationSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I      </AirSyncBase:BodyPreference>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I     </Options>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I    </Folder>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] HandleSync(): FilterType has changed (old: '', new: '4'), removing folderstat to force Exporter setup
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I   </Folders>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] I  </Synchronize>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] HandleSync(): Start Output
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::GetAdditionalSyncFolderStore('d3cebb4b355848d589969ff20440b6ee7b4100000000'): 'false'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] KopanoBackend->GetFolderStat() fetched status information of 24 folders for store 'test'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncParameters->IsExporterRunRequired(): true - current: 1542110319/2/0/0 - saved: false - expiring: not set
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Sync->loadStates(): loading states for folder 'Ud4d68'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->GetState() read '15' bytes from file: '/var/lib/z-push/9/9/androidc259103399-2a546d96-7c8b-4a15-9df5-090f9b7ae460-1'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::GetAdditionalSyncFolderStore('d3cebb4b355848d589969ff20440b6ee7b4100000000'): 'false'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::GetAdditionalSyncFolderStore('d3cebb4b355848d589969ff20440b6ee7b4100000000'): 'false'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ExportChangesICS->Config(): synching inital data
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ExportChangesICS->Config() initialized with state: 0xef00000000000000
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ExportChangesICS->InitializeExporter() successfully. 1 changes ready to sync for 'd3cebb4b355848d589969ff20440b6ee7b4100000000'.
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] LoopDetection->ProcessLoopDetectionAddStatus: 'Ud4d68' with status 1
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] WBXMLEncoder->startWBXML() type: vnd.ms-sync.wbxml
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Folder type: Calendar
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O  <Synchronize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O   <Folders>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O    <Folder>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     <SyncKey>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     {2a546d96-7c8b-4a15-9df5-090f9b7ae460}2
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     </SyncKey>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     <FolderId>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     Ud4d68
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     </FolderId>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     <Status>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     </Status>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] LoopDetection->Detect(): folderid:'Ud4d68' uuid:'2a546d96-7c8b-4a15-9df5-090f9b7ae460' counter:'1' max:'10' queued:'1'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] PHPWrapper->ImportMessageChange(): Getting message from MAPIProvider, sourcekey: 'd3cebb4b355848d589969ff20440b6ee8e4100000000', parentsourcekey: 'd3cebb4b355848d589969ff20440b6ee7b4100000000', entryid: '000000007e9b0aefe8e241eaaeb1c9f1257048db01000000050000004ea9547896fd4cb8aa4f1c6bbde563e400000000'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] BodyPreference types: 1
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] GetBodyPreferenceBestMatch: 1
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] bpo: truncation size:'200000', allornone:'0', preview:'0'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] MAPIStreamWrapper::stream_open(): initialized mapistream: Resource id #119 - streamlength: 0 - HTML-safe-truncate: false
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] TimezoneUtil::GetFullTZ() for Europe/Amsterdam
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] MAPIProvider->getAppointment(): setting ourself as the organizer for an appointment without attendees.
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     <Perform>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O      <Add>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O       <ServerEntryId>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O       Ud4d68:d3cebb4b355848d589969ff20440b6ee8e4100000000
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O       </ServerEntryId>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O       <Data>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:DtStamp>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        20181113T115839Z
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:DtStamp>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:StartTime>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        20181112T230000Z
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:StartTime>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:Subject>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        test
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:Subject>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:UID>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        d3cebb4b355848d589969ff20440b6ee8e4100000000
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:UID>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:OrganizerName>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        Max Mustermann
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:OrganizerName>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:OrganizerEmail>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        test@sowei.de
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:OrganizerEmail>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:EndTime>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        20181113T230000Z
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:EndTime>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:Sensitivity>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        0
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:Sensitivity>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:BusyStatus>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        0
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:BusyStatus>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:AllDayEvent>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:AllDayEvent>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:Reminder>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        1080
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:Reminder>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <POOMCAL:MeetingStatus>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        0
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </POOMCAL:MeetingStatus>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <AirSyncBase:Body>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         <AirSyncBase:Type>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         </AirSyncBase:Type>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         <AirSyncBase:EstimatedDataSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         0
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         </AirSyncBase:EstimatedDataSize>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         <AirSyncBase:Data>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         <<< written 0 of 0 bytes of plain data >>>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O         </AirSyncBase:Data>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </AirSyncBase:Body>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        <AirSyncBase:NativeBodyType>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        1
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O        </AirSyncBase:NativeBodyType>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O       </Data>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O      </Add>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] PHPWrapper->ImportMessageChange(): change for: 'Ud4d68:d3cebb4b355848d589969ff20440b6ee8e4100000000'
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O     </Perform>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SetFolderSyncStatus(): completed for Ud4d68
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] ZPush::GetAdditionalSyncFolderStore('d3cebb4b355848d589969ff20440b6ee7b4100000000'): 'false'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] Sync()->setFolderStat() on Ud4d68: 1542110319/2/0/0 expiring 2018-11-27 07:19:37
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O    </Folder>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->SetState() written 1 bytes on file: '/var/lib/z-push/9/9/androidc259103399-2a546d96-7c8b-4a15-9df5-090f9b7ae460-2'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] SyncCollections->SaveCollection(): Data of folder 'Ud4d68' changed
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->SetState() written 1 bytes on file: '/var/lib/z-push/9/9/androidc259103399-2a546d96-7c8b-4a15-9df5-090f9b7ae460-fd'
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O   </Folders>
13/11/2018 13:00:19 [ 2643] [WBXML] [test] O  </Synchronize>
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] WBXMLEncoder->endTag() WBXML output completed
13/11/2018 13:00:19 [ 2643] [WBXML] [test] WBXML-OUT: AwFqAEVcT0sDezJhNTQ2ZDk2LTdjOGItNGExNS05ZGY1LTA5MGY5YjdhZTQ2MH0yAAFSA1VkNGQ2OAABTgMxAAFWR00DVWQ0ZDY4OmQzY2ViYjRiMzU1ODQ4ZDU4OTk2OWZmMjA0NDBiNmVlOGU0MTAwMDAwMDAwAAFdAARRAzIwMTgxMTEzVDExNTgzOVoAAWcDMjAxODExMTJUMjMwMDAwWgABZgN0ZXN0AAFoA2QzY2ViYjRiMzU1ODQ4ZDU4OTk2OWZmMjA0NDBiNmVlOGU0MTAwMDAwMDAwAAFaA01heCBNdXN0ZXJtYW5uAAFZA3Rlc3RAc293ZWkuZGUAAVIDMjAxODExMTNUMjMwMDAwWgABZQMwAAFNAzAAAUYDMQABZAMxMDgwAAFYAzAAAQARSkYDMQABTAMwAAFLAwABAVYDMQABAQEBAQEB
13/11/2018 13:00:19 [ 2643] [WBXML] [test] WBXML-IN : AwFqAEVcT0sDezJhNTQ2ZDk2LTdjOGItNGExNS05ZGY1LTA5MGY5YjdhZTQ2MH0xAAFSA1VkNGQ2OAABHhNVAzEwAAFXWAM0AAEAEUVGAzEAAUcDMjAwMDAwAAEBAQEBAQ==
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->Save(): Device data changed
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] FileStateMachine->SetState() written 1 bytes on file: '/var/lib/z-push/9/9/androidc259103399-devicedata'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] DeviceManager->Save(): Device data saved
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] LoopDetection->ProcessLoopDetectionTerminate()
13/11/2018 13:00:19 [ 2643] [ INFO] [test] cmd='Sync' memory='2.58 MiB/2.00 MiB' time='0.07s' devType='Android' devId='androidc259103399' getUser='test' from='91.16.124.153' idle='0s' version='2.4.4+0-0' method='POST' httpcode='200'
13/11/2018 13:00:19 [ 2643] [DEBUG] [test] -------- End

FilterType is 4 (two weeks).

Standard sync for mails is 14 days at exchange client and I can change that (what I always do) to all. I can’t change that for the calendar.

Zarafa meldet

14/11/2018 07:23:45 [ 2534] [DEBUG] [olaf] We are using a workaround for Android FilterType issue. So set it to: 0

Well whatever you have there, its not part of the Z-Push sourcecode https://stash.z-hub.io/plugins/servlet/search?q=project%3AZP%20repo%3Az-push%20workaround%20for%20Android%20FilterType%20issue

Maybe you want to contribute your changes back upstream once you have diffed your files against the official release of the version you have in use. https://wiki.z-hub.io/display/ZP/Development+guidelines

I think I found the difference in /usr/share/z-push/lib/request/sync.php:

Zarafa

                    // limit items to be synchronized to the mobiles if configured
                    if(Request::GetDeviceType() == 'Android'){
                     ZLog::Write(LOGLEVEL_DEBUG, sprintf("We are using a workaround for Android FilterType issue. So set it to: %s",SYNC_FILTERTIME_MAX));
                      $spa->SetFilterType(SYNC_FILTERTIME_MAX);
                      }
                    if (defined('SYNC_FILTERTIME_MAX') && SYNC_FILTERTIME_MAX > SYNC_FILTERTYPE_ALL &&
                        (!$spa->HasFilterType() || $spa->GetFilterType() == SYNC_FILTERTYPE_ALL || $spa->GetFilterType() > SYNC_FILTERTIME_MAX)) {
                            ZLog::Write(LOGLEVEL_DEBUG, sprintf("SYNC_FILTERTIME_MAX defined. Filter set to value: %s", SYNC_FILTERTIME_MAX));
                            $spa->SetFilterType(SYNC_FILTERTIME_MAX);
                    }

UCS

                    // limit items to be synchronized to the mobiles if configured
                    $maxAllowed = self::$deviceManager->GetFilterType($spa->GetFolderId());
                    if ($maxAllowed > SYNC_FILTERTYPE_ALL &&
                        (!$spa->HasFilterType() || $spa->GetFilterType() == SYNC_FILTERTYPE_ALL || $spa->GetFilterType() > $maxAllowed)) {
                            ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): FilterType applied globally or specifically, using value: %s", $maxAllowed));
                            $spa->SetFilterType($maxAllowed);
                    }

I’m not a developer just a user and I’ve no idea what the workaround in Zarafa does. I think I’ll take a snapshot form my UCS-Server, change the section
// limit items to be synchronized to the mobiles if configured
and try to sync my data.

The test was successful. All events are synced.

Using

                    // limit items to be synchronized to the mobiles if configured
                    if(Request::GetDeviceType() == 'Android'){
                     ZLog::Write(LOGLEVEL_DEBUG, sprintf("We are using a workaround for Android FilterType issue. So set it to: %s",SYNC_FILTERTIME_MAX));
                      $spa->SetFilterType(SYNC_FILTERTIME_MAX);
                      }
                    if (defined('SYNC_FILTERTIME_MAX') && SYNC_FILTERTIME_MAX > SYNC_FILTERTYPE_ALL &&
                        (!$spa->HasFilterType() || $spa->GetFilterType() == SYNC_FILTERTYPE_ALL || $spa->GetFilterType() > SYNC_FILTERTIME_MAX)) {
                            ZLog::Write(LOGLEVEL_DEBUG, sprintf("SYNC_FILTERTIME_MAX defined. Filter set to value: %s", SYNC_FILTERTIME_MAX));
                            $spa->SetFilterType(SYNC_FILTERTIME_MAX);
                    }

brings a new problem. I can’t edit events synced from Kopano to my phone. It seems they are write protected. I can edit events created on the phone in Kopano and on the phone.

This is for those who want to try my “Zarafa solution”.

I think I will start a post on official z-push forum.

Had also Problem editing events in Android - switched to the nine client (cost a small bug - but its worth) that did not have problems - you may try this client for few days for free (maybe it solves your problems too)

rg
Christian

I only have this problem by using this unofficial way of setting filtertype to null for syncing all past events. It’s not a client problem.

Cheers
Olaf

Mastodon