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.
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.
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.
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.
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>
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.
// 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)