offlineimap/mbsync state files compatibility

Oswald Buddenhagen oswald.buddenhagen at gmx.de
Wed Dec 9 08:18:33 UTC 2015


On Mon, Dec 07, 2015 at 09:54:29PM -0300, Raphaël wrote:
> What are the 2+3 values, in the header of mbsync's folder state file?
>
git master rewrites the format to use a header with more or less
self-explanatory keywords, so you probably should just give it a try.

> ========= other questions:
> - My goal being to continue, with mbsync, a synchronisation started for
> backup-purposes with OfflineIMAP, what part of the state could be
> omitted that mbsync could intelligently deduce?
> 
the only things that are safe to be zeroed out are the maxuid fields
(the parts after the colons).

> - Why mbsync .uidvalidity file does not contain the value that
>   OfflineIMAP calls folder UIDVALIDITY?
> 
i presume offlineimap forces the remote uid scheme onto the local store,
so it has only one set of uidvalidity and uids. mbsync enumerates the
local store separately, so it has two sets which need to be mapped.

> - What the 2nd column of the mbsync state file is useful for?
> 
mbsync maintains a mapping of remote (col 1) to local (col 2) uids.
when you migrate, you can just duplicate the columns.

fwiw, this is actually quite similar to migrating from early isync
versions (<= 0.7), for which the isync compat wrapper provides automatic
conversion - the only thing you'd need to do is moving each folder's
file from FolderValidity/ to the folder itself and renaming it to
"isyncuidvalidity". this discards the flag state, so make sure it's all
synced before you start.

> - Any efforts to document (standardize?) these internal data/state files?
> 
nope.

it wouldn't be too useful to make the state files compatible, as a
migration like you're attempting is quite uncommon (though admittedly
one of the most common questions on this list).

having a standardized format for the maildir extensions otoh would
certainly be a win, because MUAs could make good use of it. i just saw
in the list archive that offlineimap is getting support for imap
keywords, and it would be really helpful to have a single format for
that.




More information about the OfflineIMAP-project mailing list