Problem syncing mail - crash

Knut Anders Hatlen knut.hatlen at
Sat Jul 23 11:31:29 BST 2011

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

>> git log
>> git diff
> So I played today with and it seems to be broken in a way that
> it actually works :)
> What happens here is
>  1) new message is created in Maildir
>  2) message is copied to IMAP
>    "Copy message -1 Maildir[twiki] -> IMAP[twiki], LocalStatus[twiki]"
>  3) offlineimap tries to find it's UID, but fails
>  4) I _GUESS_ that the message in Maildir is deleted?

(The deletion seems to happen the next time offlineimap is run.)

>  5) on next offlineimap run, we find new message in the IMAP folder and
>     sync it back to Maildir
>    "Copy message 41 IMAP[twiki] -> Maildir[twiki], LocalStatus[twiki]"
> I'm not sure about 4), but I can see the message in Maildir just once.
> The behavior in current 'next' branch is the same till 3)

I ran git bisect to find exactly when this started happening. It worked
in the most recent release (6.3.3), and stopped working with this

commit e20d8b967942934ddbf4659b5ec328a9a18da6bc
Author: Sebastian Spaeth <Sebastian at>
Date:   Thu Mar 24 17:45:21 2011 +0100

    Remove upload neguid pass from sync logic
    In order to optimize performance, we fold the 1st and 2nd pass of our
    sync strategy into one. They were essentially doing the same thing:
    uploading a message to the other side. The only difference was that in
    one case we have a negative UID locally, and in the other case, we have
    a positive one already.
    This saves some time, as we don't have to run through that function on
    IMAP servers anyway (they always have positive UIDs), and 2nd were we
    stalling further copying until phase 1 was finished. So uploading a
    single new message would prevent us from starting to copy existing
    regular messages.
    Signed-off-by: Sebastian Spaeth <Sebastian at>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at>

Now we just need someone who knows enough IMAP to fix it. :)

Knut Anders

More information about the OfflineIMAP-project mailing list