<p>If you cannot upgrade to v6.5.7, the workaround (bad) solution I found after it happened to me (because LocalStatus file was corrupted due to a system crash) was to delete the LocalStatus file (normally in ~/.offlineimap/Account-XXX/LocalStatus/folder_name) and the entire folder in "$MAIL" and run offlineimap to resync everything again.</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/133#issuecomment-139287977">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSEAqhkyGHLqk3IUJP5hF4dadD_sW1ks5owZ44gaJpZM4C2LZh.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/133#issuecomment-139287977"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>