OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

command: FETCH => socket error: <class 'OSError'> - Too many read 0 #726

Open alexmihajlov opened 2 years ago

alexmihajlov commented 2 years ago

General informations

Configuration file offlineimaprc

[general]
ui = basic
accounts = MyExchangeServer
fsync = false
maxsyncaccounts = 1
singlethreadperfolder = false
holdconnectionopen = yes
ssl_version = StartTLS
usecompression = yes
keepalive = 60

[Account MyExchangeServer]
localrepository = MyExchangeServer-Local
remoterepository = MyExchangeServer-Remote
autorefresh = 0.5
quick = 10
utf8foldernames = yes

[Repository MyExchangeServer-Local]
type = Maildir
localfolders = ~/.Mail/MyExchangeServer

[Repository MyExchangeServer-Remote]
type = IMAP
remotehost = mail.myserver.org
remoteport = 993
remoteuser = user
remotepass = pass
realdelete = no
maxconnections = 1
ssl = yes
sslcacertfile = /etc/ssl/cert.pem
keepalive = 6
auth_mechanisms = PLAIN, LOGIN

pythonfile (if any)

N/A

Logs, error

Establishing connection to mail.myserver.org:993 (MyExchangeServer-Remote)
Syncing outages: IMAP -> Maildir
Syncing removal: IMAP -> Maildir
Syncing Remstats: IMAP -> Maildir
ERROR: ERROR in syncfolder for MyExchangeServer folder Remstats: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/offlineimap/accounts.py", line 653, in syncfolder
    remotefolder.cachemessagelist()
  File "/usr/local/lib/python3.9/site-packages/offlineimap/folder/IMAP.py", line 299, in cachemessagelist
    res_type, response = imapobj.fetch(
  File "/usr/local/lib/python3.9/site-packages/imaplib2/imaplib2.py", line 828, in fetch
    return self._simple_command(name, message_set, message_parts, **kw)
  File "/usr/local/lib/python3.9/site-packages/imaplib2/imaplib2.py", line 1705, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/local/lib/python3.9/site-packages/imaplib2/imaplib2.py", line 1449, in _command_complete
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
  File "/usr/local/lib/python3.9/site-packages/imaplib2/imaplib2.py", line 212, in get_response
    raise typ(exc_fmt % str(val))
imaplib2.imaplib2.IMAP4.abort: command: FETCH => socket error: <class 'OSError'> - Too many read 0

  command: FETCH => socket error: <class 'OSError'> - Too many read 0
Syncing root mail: IMAP -> Maildir

Steps to reproduce the error

trying to get mail from a mailbox with 25,000 emails

alexmihajlov commented 2 years ago

please close, wrong version