too many read 0 - large attachments

Scot Junkin junkin at
Thu Nov 19 13:06:20 GMT 2015


I am working with offlineimap version 6.6.0-rc3 and davmail version

My setup of concern is Outlook <-> DavMail <-> offlineimap

Anecdotally this same offlineimap has worked fine for ~100k messages
from gmail and Thunderbird has no issues downloading all mail through
DavMail - I set these two pieces up to help narrow down issues. 

When I run offlineimap against DavMail it consistently throws exceptions on
specific messages, once a message triggers an exception that folder will
no longer be able to sync, and the process will fail.  I have logged in
by hand and examined many of the messages in questions, they to date
have always been with attachments and somewhat large > 4MB.  If I delete
the message or move it to a different folder the sync for the current
folder will continue until the next oversized attachment yielding the
too many read 0 IO exception

SO -

I tried tweaking the max retires and the timeout in the _reader function
in the imaplib2 library.  This didnt produce any positive results, it
just takes longer for offlineimap to get to the exception path.  It
appears to be an issue in  Before I dig too deep in to the
bits anyone have suggestions?


Syncing INBOX: IMAP -> Maildir
 Copy message 35241 (1 of 6025) Remote:INBOX -> Local
 Copy message 35242 (2 of 6025) Remote:INBOX -> Local
Copy message from Remote:INBOX:
 Establishing connection to
 ERROR: command: UID => socket error: <type 'exceptions.IOError'> - Too many read 0
 Establishing connection to
 ERROR: command: UID => socket error: <type 'exceptions.IOError'> - Too many read 0
 ERROR: Copying message 35241 [acc: Juniper]
  list.remove(x): x not in list
Thread 'Copy message from Remote:INBOX' terminated with exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/offlineimap/", line 163, in run
  File "/usr/lib/python2.7/", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/offlineimap/folder/", line 782, in copymessageto
    message = self.getmessage(uid)
  File "/usr/local/lib/python2.7/dist-packages/offlineimap/folder/", line 287, in getmessage
  File "/usr/local/lib/python2.7/dist-packages/offlineimap/", line 173, in releaseconnection
ValueError: list.remove(x): x not in list

More information about the OfflineIMAP-project mailing list