Resync a single email folder
-
I am running z-sync with a zimbra backend.
Is it possible to resync a single folder? The docs seem to think so, but in practice it does not work.
z-push-admin -a syncronize -t 9e4ce3427ba34a7caab5c641e5bfe169 -u somebody@somewhere.com -d bluemailxxxxxxxx
However, z-push-admin just says: Wrong ‘type’. Possible values are: ‘email’, ‘calendar’, ‘contact’, ‘task’, ‘note’, ‘hierarchy’, ‘gab’ or a 6, 44 or 48 byte long folder id (as hex).
In the case above, the folder id is the UUID.
Reading the code seems to indicate that the folder id option is more oriented towards the Kapano backend.
It is very inconvenient to have to resync all of a user’s folders.
-
So the problem is with the type sanity check code. The folder id’s returned by the ‘list’ action are all of the form ‘fxxxxx.’ Using folder id’s of this form with the default code results in it complaining about the type as in the above message.
Commenting out the type sanity check code for a moment results in the script performing as expected and producing the following output:
Found and resynching requested folderid 'f5' on device 'bluemailxxxxxxx' of user 'somebody@somewhere.com' Resync of 1 folders of type 'f5' on device 'bluemailxxxxxxx' of user 'somebody@somewhere.com': Requested
Now… to see if the resync actually occurs. If it does, I’ll mod the sanity check to allow for folder ids of this form.
-
So that appears to have fixed it. f5 is the ‘sent’ folder folder id.
I’ll dress it up and push a copy to repo on github and post the link to the fix in case anyone is interested.
Synchronized devices of user: somebody@somewhere.com ----------------------------------------------------- DeviceId: bluemailxxxxxxxxx Device type: Android UserAgent: BlueMail/9-EAS-2.0 Device Model: moto g(6) Device IMEI: 000000000000000 Device friendly name: moto g(6) Device OS: Android 9 ActiveSync version: 14.0 First sync: 2021-04-08 08:59 Last sync: 2021-05-25 20:18 Sync Period: unlimited (0) Total folders: 102 Short folder Ids: No Synchronized folders: 9 (2 in progress) Synchronized data: Calendars Contacts Emails(7) Synchronization progress: Folder: Sent Sync: Synchronizing Status: 10% (2136/21912) Folder: Trash Sync: Initialized Status: 0% (0/131) Additional Folders: none Status: OK WipeRequest on: not set WipeRequest by: not set Wiped on: not set Policy name: default Attention needed: No errors known
-
I’m still waiting to get things set up to formally submit this fix. In the meantime, it is here if anyone wants it.
-
@chris_60 said in Resync a single email folder:
I am running z-sync with a zimbra backend.
<snip>
In the case above, the folder id is the UUID.
Just to clarify, the original issue was that the Zimbra backend (I think) uses folder ids of the type ‘fxn’ and ‘FLxn-xn’ where x is an integer and n is some number of integers.
During my troubleshooting, I was attempting to use the UUID which obviously did not work.