Skip to content

"socket error: <class 'OSError'> - Too many read 0" failure #253

Description

@eps-epsiloneridani

MacOS 27.0 Beta (26A5353q), Homebrew 6.02
OfflineIMAP 8.0.3
Python 3.14.6
imap.migadu.com
/opt/homebrew/opt/offlineimap/bin/offlineimap -d imap (although error persists regardless of UI)

offlineimaprc

[general]
accounts = multi, hkc
maxsyncaccounts = 1

[Account multi]
localrepository = mLocal
remoterepository = mRemote
autorefresh = 5

[Repository mLocal]
type = Maildir
localfolders = ~/mail/multi

[Repository mRemote]
type = IMAP
remotehost = imap.migadu.com
remoteuser = [redacted]
remotepass = [redacted]
ssl = no
starttls = yes
remoteport = 993
usecompression = no

Output:

(FYI note the version number of imaplib2, this is what's being installed from the current 3.6 package)

OfflineIMAP 8.0.3
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.06, Python v3.14.6, OpenSSL 3.6.2 7 Apr 2026
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync multi:
 [imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
 *** Processing account multi
 Establishing connection to imap.migadu.com:993 (mRemote)
 [imap]:   46:57.26 Account sync multi imaplib2 version 3.06
 [imap]:   46:57.26 Account sync multi imaplib2 debug level 5, buffer level 3
 [imap]:   46:57.45 Account sync multi connected to imap.migadu.com on port 993
imap.migadu.com writer:
 [imap]:   46:57.45 imap.migadu.com writer starting
Account sync multi:
 [imap]:   46:57.45 Account sync multi _request_push(continuation, welcome, {}) = b'OMAH0'
 [imap]:   46:57.45 Account sync multi welcome:b'OMAH0'.ready.wait
imap.migadu.com reader:
 [imap]:   46:57.45 imap.migadu.com reader starting using poll
imap.migadu.com handler:
 [imap]:   46:57.55 imap.migadu.com handler starting
imap.migadu.com reader:
 [imap]:   47:07.59 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:07.59 imap.migadu.com reader rcvd 0
 [imap]:   47:07.70 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:07.70 imap.migadu.com reader rcvd 0
 [imap]:   47:07.80 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:07.80 imap.migadu.com reader rcvd 0
 [imap]:   47:07.90 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:07.90 imap.migadu.com reader rcvd 0
 [imap]:   47:08.01 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:08.01 imap.migadu.com reader rcvd 0
 [imap]:   47:08.11 imap.migadu.com reader poll => [(9, 17)]
 [imap]:   47:08.11 imap.migadu.com reader rcvd 0
 [imap]:   47:08.11 imap.migadu.com reader last 20 log messages:
 [imap]:   46:57.45 imap.migadu.com writer starting
 [imap]:   46:57.45 imap.migadu.com reader starting using poll
 [imap]:   46:57.55 imap.migadu.com handler starting
 [imap]:   47:08.11 imap.migadu.com reader socket error: <class 'OSError'> - Too many read 0
 [imap]:   47:08.11 imap.migadu.com reader finished
imap.migadu.com handler:
 [imap]:   47:08.11 imap.migadu.com handler terminating: "socket error: <class 'OSError'> - Too many read 0"
 [imap]:   47:08.11 imap.migadu.com handler welcome:b'OMAH0'.ready.set
 [imap]:   47:08.11 imap.migadu.com handler state_change_free.set
 [imap]:   47:08.11 imap.migadu.com handler finished
Account sync multi:
 [imap]:   47:08.11 Account sync multi _close_threads
imap.migadu.com writer:
 [imap]:   47:08.11 imap.migadu.com writer finished
Account sync multi:
 [imap]:   47:08.11 Account sync multi call shutdown
 ERROR: While attempting to sync account 'multi'
  IMAP4 protocol error: socket error: <class 'OSError'> - Too many read 0
 ['  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/offlineimap/accounts.py", line 298, in syncrunner\n    self.__sync()\n    ~~~~~~~~~~~^^\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/offlineimap/accounts.py", line 378, in __sync\n    remoterepos.getfolders()\n    ~~~~~~~~~~~~~~~~~~~~~~^^\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/offlineimap/repository/IMAP.py", line 718, in getfolders\n    imapobj = self.imapserver.acquireconnection()\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/offlineimap/imapserver.py", line 757, in acquireconnection\n    imapobj = imaplibutil.WrappedIMAP4(\n        self.hostname, self.port,\n    ...<3 lines>...\n        af=self.af,\n    )\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/offlineimap/imaplibutil.py", line 243, in __init__\n    IMAP4.__init__(self, *args, **kwargs)\n    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/imaplib2/imaplib2.py", line 396, in __init__\n    self.welcome = self._request_push(name=\'welcome\', tag=\'continuation\').get_response(\'IMAP4 protocol error: %s\')[1]\n                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/opt/homebrew/Cellar/offlineimap/8.0.3/libexec/lib/python3.14/site-packages/imaplib2/imaplib2.py", line 212, in get_response\n    raise typ(exc_fmt % str(val))\n']
 *** Finished account 'multi' in 0:10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions