<p>Hi !</p>

<p>I'm trying to synch my email (quantity: 90k), and it keeps crashing.<br>
Here is the log : </p>

<pre><code>Last 7 debug messages logged for Copy message from Remote:INBOX prior to exception:
thread: Register new thread 'Copy message from Remote:INBOX' (account 'Gabriel')
imap: Using STARTTLS connection
imap: Attempting PLAIN authentication
imap: __plainhandler: returning gabriel@soixantecircuits.frXXXXXXXXX
imap: Using STARTTLS connection
imap: Attempting PLAIN authentication
imap: __plainhandler: returning gabriel@soixantecircuits.frXXXXXXXXX
ERROR: Exceptions occurred during the run!
ERROR: command: UID => socket error: <class 'socket.error'> - [Errno 54] Connection reset by peer

Traceback:
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/folder/IMAP.py", line 660, in _fetch_from_imap
    res_type, data = imapobj.uid('fetch', uids, query)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1167, in uid
    return self._simple_command('UID', command, *args, **kw)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1615, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1378, in _command_complete
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 176, in get_response
    raise typ(exc_fmt % str(val))

ERROR: command: UID => socket error: <class 'socket.error'> - [Errno 54] Connection reset by peer

Traceback:
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/folder/IMAP.py", line 660, in _fetch_from_imap
    res_type, data = imapobj.uid('fetch', uids, query)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1167, in uid
    return self._simple_command('UID', command, *args, **kw)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1615, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 1378, in _command_complete
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imaplib2.py", line 176, in get_response
    raise typ(exc_fmt % str(val))

ERROR: Copying message 22004 [acc: Gabriel]
  list.remove(x): x not in list

Traceback:
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/folder/Base.py", line 581, in copymessageto
    message = self.getmessage(uid)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/folder/IMAP.py", line 267, in getmessage
    self.imapserver.releaseconnection(imapobj)
  File "/usr/local/Cellar/offline-imap/6.5.6/libexec/offlineimap/imapserver.py", line 131, in releaseconnection
    self.assignedconnections.remove(connection)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OfflineIMAP/offlineimap/issues/205">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSEOzGTGb72sXKoitRIrtcKtDUgT2eks5oLfDPgaJpZM4EjkWN.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OfflineIMAP/offlineimap/issues/205"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>