<p>All was well for six months till a few days ago with Yahoo. Gmail works fine but Yahoo sync works on all folders except the 'Inbox' with this output:</p>

<p>OfflineIMAP 6.5.7-rc1<br>
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)<br>
Account sync yahoo:<br>
 *** Processing account yahoo<br>
 Establishing connection to imap.mail.yahoo.com:993<br>
Folder Archive [acc: yahoo]:<br>
 Syncing Archive: IMAP -> Maildir<br>
Folder Drafts [acc: yahoo]:<br>
 Syncing Drafts: IMAP -> Maildir<br>
Folder Inbox [acc: yahoo]:<br>
 Syncing Inbox: IMAP -> Maildir<br>
 ERROR: ERROR in syncfolder for yahoo folder Inbox: Traceback (most recent call last):<br>
  File "/Library/Python/2.7/site-packages/offlineimap/accounts.py", line 449, in syncfolder<br>
    remotefolder.cachemessagelist()<br>
  File "/Library/Python/2.7/site-packages/offlineimap/folder/IMAP.py", line 216, in cachemessagelist<br>
    msgsToFetch = self._msgs_to_fetch(imapobj)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/folder/IMAP.py", line 193, in _msgs_to_fetch<br>
    res_type, res_data = imapobj.search(None, search_cond)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 975, in search<br>
    return self._simple_command(name, <em>criteria, *</em>kw)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 1616, in _simple_command<br>
    return self._command_complete(self._command(name, *args), kw)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 1379, in _command_complete<br>
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 177, in get_response<br>
    raise typ(exc_fmt % str(val))<br>
abort: command: SEARCH => connection terminated</p>

<p>command: SEARCH => connection terminated<br>
Folder Notes [acc: yahoo]:<br>
 Syncing Notes: IMAP -> Maildir<br>
 Establishing connection to imap.mail.yahoo.com:993<br>
Folder Sent [acc: yahoo]:<br>
 Syncing Sent: IMAP -> Maildir<br>
Account sync yahoo:<br>
 *** Finished account 'yahoo' in 0:05<br>
ERROR: Exceptions occurred during the run!<br>
ERROR: ERROR in syncfolder for yahoo folder Inbox: Traceback (most recent call last):<br>
  File "/Library/Python/2.7/site-packages/offlineimap/accounts.py", line 449, in syncfolder<br>
    remotefolder.cachemessagelist()<br>
  File "/Library/Python/2.7/site-packages/offlineimap/folder/IMAP.py", line 216, in cachemessagelist<br>
    msgsToFetch = self._msgs_to_fetch(imapobj)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/folder/IMAP.py", line 193, in _msgs_to_fetch<br>
    res_type, res_data = imapobj.search(None, search_cond)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 975, in search<br>
    return self._simple_command(name, <em>criteria, *</em>kw)</p>

<p>File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 1616, in _simple_command<br>
    return self._command_complete(self._command(name, *args), kw)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 1379, in _command_complete<br>
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)<br>
  File "/Library/Python/2.7/site-packages/offlineimap/imaplib2.py", line 177, in get_response<br>
    raise typ(exc_fmt % str(val))<br>
abort: command: SEARCH => connection terminated</p>

<p>command: SEARCH => connection terminated</p>

<p>[ [ .offlineimaprc config file contains: ] ]</p>

<p>[general]</p>

<h1>List of accounts to be synced, separated by a comma.</h1>

<p>accounts = gmail, yahoo</p>

<p>[Account yahoo]</p>

<h1>Identifier for the local repository; e.g. the maildir to be synced via IMAP.</h1>

<p>localrepository = yahoo-local<br>
remoterepository = yahoo-remote</p>

<h1>Minutes between syncs</h1>

<p>#autorefresh = 1 # In minutes not seconds. Doesn't work on OS X. Don't use since we use wrapper 'offlineimap-load'</p>

<h1>Identifier for the remote repository; i.e. the actual IMAP, usually non-local.</h1>

<p>remoterepository = yahoo-remote</p>

<h1>Status cache. Default is plain, which eventually becomes huge and slow.</h1>

<p>#status_backend = sqlite</p>

<h1>Maxage of mail to synchronize in days</h1>

<p>maxage = 90</p>

<p>[Repository yahoo-local]<br>
type = Maildir<br>
localfolders = ~/Maildir-yahoo</p>

<p>[Repository yahoo-remote]<br>
type = IMAP</p>

<h1>This only works in continuous mode since using '-o' option runs and exits by nature</h1>

<p>keepalive = 100<br>
holdconnectionopen = yes</p>

<p>remotehost = imap.mail.yahoo.com<br>
remoteuser = username<br>
remotepass = ***************<br>
remoteport = 993<br>
ssl = yes<br>
maxconnections = 1<br>
realdelete = no<br>
folderfilter = lambda foldername: foldername in ['Inbox', 'Drafts', 'Sent', 'Spam', 'Notes', 'Archive']<br>
cert_fingerprint = c8d50e4f236438c4910aeb11d9bc588502032637</p>

<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/158">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSEB3G1IGW6IGjoq3JsCVwWb4KDfBVks5nikL3gaJpZM4DTstp.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/158"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>