<p>Okay so this error happened again and I managed to track it in time to figure out which message was causing it. It's on my local but won't sync to Gmail because of that APPEND error. Here are the headers from the offending message (with personally identifiable stuff x'ed out). Does this help at all?</p>

<p>Subject: SMS with xxxxxxxx<br>
MIME-Version: 1.0<br>
Content-Type: text/plain;<br>
 charset=utf-8<br>
From: xxxxxxx <a href="mailto:xxxxxxx@gmail.com">xxxxxxx@gmail.com</a><br>
To: xxxxxx<br>
References: <a href="mailto:7l767a1i0sc3omr1pwqjywuv.2681@sms-backup-plus.local">7l767a1i0sc3omr1pwqjywuv.2681@sms-backup-plus.local</a><br>
Message-ID: <a href="mailto:a1e0b545f6845476518ebf826e2929f6@sms-backup-plus.local">a1e0b545f6845476518ebf826e2929f6@sms-backup-plus.local</a><br>
X-smssync-address: +1xxxxxxxxx<br>
X-smssync-datatype: SMS<br>
X-smssync-backup-time: 29 Apr 2015 20:37:56 GMT<br>
X-smssync-version: 1550<br>
Date: Wed, 29 Apr 2015 16:34:53 -0400<br>
X-smssync-id: 6563<br>
X-smssync-type: 1<br>
X-smssync-date: 1430339693292<br>
X-smssync-thread: 49<br>
X-smssync-read: 0<br>
X-smssync-status: -1<br>
X-smssync-protocol: 0<br>
X-smssync-service_center: +1xxxxxxxxx<br>
Content-Transfer-Encoding: quoted-printable</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/172#issuecomment-97981586">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSEFmAWRpiqa8-1NuFMlmLsnDnnjU5ks5oEpsZgaJpZM4Djvum.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/172#issuecomment-97981586"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>