Local copy of message is 1 byte
Sebastian at SSpaeth.de
Mon Jun 13 14:33:55 BST 2011
On Thu, 9 Jun 2011 15:07:09 -0700, Leif Huhn <leif.dkstat at gmail.com> wrote:
> When running notmuch over my maildir, it complained that four of my messages
> were corrupt. I checked it out and all 4 are one byte files with the
> letter 'o' in them. This is for 6.2.0+nmu2ubuntu1 on Ubuntu Lucid.
> I searched around and noticed others have had this one byte problem, but I
> seem to have a different byte than others:
> I moved aside all my mail (and offlineimap's index) and downloaded my mail
> again, with "offlineimap -1 -d imap -l offlineimap-debug.log." This time the
> four messages downloaded properly but a different message was 1 byte. Here
> are the relevant lines from the log:
> Copy message 6871 from INBOX: Copy message 6871 IMAP[INBOX] -> Maildir[INBOX], LocalStatus[INBOX]
> Copy message 6871 from INBOX: DEBUG[imap]: 25:15.33 > LMEE7053 UID FETCH 6871 (BODY.PEEK)
> Copy message 6871 from INBOX: DEBUG[imap]: 25:16.52 < LMEE7053 NO Some messages could not be FETCHed (Failure)
> Copy message 6871 from INBOX: DEBUG[imap]: 25:16.52 matched r'(?P<tag>LMEE\d+) (?P<type>[A-Z]+) (?P<data>.*)' => ('LMEE7053', 'NO', 'Some messages could not be FETCHed (Failure)')
> Copy message 6871 from INBOX: DEBUG[imap]: 25:16.52 NO response: Some messages could not be FETCHed (Failure)
> Copy message 6871 from INBOX: DEBUG[imap]: Returned object from fetching 6871: ('NO', ['Some messages could not be FETCHed (Failure)'])
> If I type in the fetch command to GMail myself, it works. I'm guessing it's
> just an intermittent error that GMail's IMAP server produces.
> Is it possible to have offlineimap retry to get the message later? I don't
> really know what the right fix is.
In recent versions, we protect getmessage() with:
assert res_type == 'OK', "Fetching message with UID '%d' failed" % uid
So we should already bail out with an error if we receive "NO" here, as
we do. (That was recently added, I believe). But we should definitely
raise an OfflineImapError on the message level here and protect better
From invalid data sent by the server. I already inserted a code comment
to that regard, and it should be done asap.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project