stateless synchronization

Ploc pub2011 at acampado.net
Sun Nov 6 19:52:32 UTC 2011


Le 04/11/2011 21:35, Sebastian Spaeth a écrit :
> On Fri, 04 Nov 2011 00:54:28 +0100, Ploc<pub2011 at acampado.net>  wrote:
>> The main philosophy of OfflineIMAP is then to choose the safer wayin
>> order to prevent unwanted mail deletion. Each mail is transferred to the
>> other repository.
>
> Yes.
>
>> But what happens if one of the repository uses the new parameter
>> "readonly = True" ? Is there a special way of rebuilding cached data ?
>> As one of the repository is readonly, every mail deleted from this
>> repository should also be deleted from the other repository. Does
>> OfflineIMAP work like that ?
>
> If readonly=True, it will simply not sync in that direction.
>
> So if REMOTEIMAP1 (readonly=True) and LOCALMAILDIR (readonly=False) are
> your repos, and the cache goes missing, it will:
>
> 1a) sync REMOTEIMAP1 mails to LOCALMAILDIR, adding all new messages
> 1b) delete all mails in LOCALMAILDIR that are not in REMOTEIMAP1 but
>      have a valid (>0) UID recorded. (so they are not "NEW")
> As sync in the other direction will be skipped, new messages that are
> really new (ie those that don't have UID=<number>,FMD5=<folderMD5>  in
> their file name), will simply be ignored and left alone, as far as I can
> see. At least, that is what I think it would be doing without actually
> testing.
>
> Sebastian

Thank you Sebatian pour these explanations.

I do understand from your explanations that - in case of a readonly 
repository, the "safer algorithm" is dissmissed and - according to "1b", 
OfflineIMAP also DELETES mails.

Am I right ?

If yes, this would be perfect as this allow to have with OfflineIMAP a 
behaviour quite close from the one of imapsync.



More information about the OfflineIMAP-project mailing list