[PATCH 2/4] Re: Handle when UID can't be found on saved messages

Knut Anders Hatlen knut.hatlen at oracle.com
Wed Jul 27 16:45:46 BST 2011


Vladimir Marek <Vladimir.Marek at Oracle.COM> writes:

>> > +            elif newuid == 0:
>> > +                # Message was stored to dstfolder, but we can't find it's UID
>> > +                # This means we can't link current message to the one created
>> > +                # in IMAP. So we just delete local message and on next run
>> > +                # we'll sync it back
>> > +                # XXX This could cause infinite loop on syncing between two
>> > +                # IMAP servers ...
>> 
>> I'm afraid about this infinite loop. Can you tell more?
>> 
>> I understand it could be done only if two instances of offlineimap are
>> running on both side.  Am I correct or did I miss something?
>
> Yes. If we find new mail on 'local' side, we upload it to 'remote' side
> and then try to find it's UID on the remote side. If we can't find it
> for any reason, as a fallback we erase the mail on 'local' storage and
> on next run we hope that it will be synchronized back. But if both sides
> are IMAP and both IMAP servers don't allow us to find our X-OfflineIMAP
> header, we'll be doing that in a infinite loop.

Just to be perfectly clear, this isn't a new problem, right? The patch
just reverts the behaviour back to what it was in the latest release
(6.3.3).

-- 
Knut Anders




More information about the OfflineIMAP-project mailing list