--- /dev/null
+Return-Path: <r.m.krug@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 471F5431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 16 Apr 2013 02:19:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+ tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id gBlMHGiIr0tg for <notmuch@notmuchmail.org>;\r
+ Tue, 16 Apr 2013 02:19:13 -0700 (PDT)\r
+Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com\r
+ [74.125.82.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 4BDB4431FAF for <notmuch@notmuchmail.org>; Tue, 16 Apr 2013 02:19:13 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f46.google.com with SMTP id e11so231553wgh.25\r
+ for <notmuch@notmuchmail.org>; Tue, 16 Apr 2013 02:19:12 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=x-received:from:to:subject:date:message-id:user-agent:mime-version\r
+ :content-type;\r
+ bh=TF3pQJqe/jDG+CLAr+4fXQ8ZNlJGe7FNA4YOWS2vHAY=;\r
+ b=c5NYQVEw/yA/1YQT59xuJcpT5fAS6v52tr9iv0l+nmZ7EZZkHHsJxdANEuYVhxGylP\r
+ i0nsehuDOvR80wpVQT9txC07+46eHaN8JGbLV2kjtk9hgSyKGaEHuoZ3KCC901Voi5hY\r
+ XBdb4gAbqwBxRlht7naapGqXVe7mkCasTU00nEZ+F5sVrXLTqav39RJmaB17PCnjSu+N\r
+ TodTq6dzSn3BLKjpFXw0MxubGrRPiXe3dEqhDO7S5sp1oy+nnxR0tzxst04ff6fDFcXY\r
+ mBEhJi1e6ZsTsdsL+axG0h0DvHsjWdlwqJRjquQvAXB3dX0yBQptydD6ucJLGUrIAfJo\r
+ bifg==\r
+X-Received: by 10.194.5.196 with SMTP id u4mr2194741wju.54.1366103952073;\r
+ Tue, 16 Apr 2013 02:19:12 -0700 (PDT)\r
+Received: from ecolmod ([2a01:e35:8baa:b070:3195:b1f6:2ed:d6ac])\r
+ by mx.google.com with ESMTPS id bj9sm18219130wib.4.2013.04.16.02.19.10\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Tue, 16 Apr 2013 02:19:11 -0700 (PDT)\r
+From: Rainer@krugs.de (Rainer M. Krug)\r
+To: notmuch@notmuchmail.org\r
+Subject: Crash when syncing from gmail to local imap\r
+Date: Tue, 16 Apr 2013 11:18:31 +0200\r
+Message-ID: <87haj6ltp4.fsf@krugs.de>\r
+User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 16 Apr 2013 09:19:17 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Hi\r
+\r
+I encounter a crash when I sync from gmail to local imap account.=20\r
+The output I get is:\r
+\r
+,----\r
+| Copy message 848831 (7 of 9) RemoteRMKrugGMAIL:[Gmail]/All Mail -> Local=\r
+RMKrugGMAIL\r
+| Copy message from RemoteRMKrugGMAIL:[Gmail]/All Mail:\r
+| Establishing connection to localhost:143\r
+| Folder [Gmail]/All Mail [acc: Gmail]:\r
+| Copy message 848832 (8 of 9) RemoteRMKrugGMAIL:[Gmail]/All Mail -> Local=\r
+RMKrugGMAIL\r
+| Copy message 848834 (9 of 9) RemoteRMKrugGMAIL:[Gmail]/All Mail -> Local=\r
+RMKrugGMAIL\r
+| Copy message from RemoteRMKrugGMAIL:[Gmail]/All Mail:\r
+| ERROR: command: CHECK =3D> socket error: <type 'exceptions.IOError'> - T=\r
+oo many read 0\r
+| Thread 'Copy message from RemoteRMKrugGMAIL:[Gmail]/All Mail' terminated =\r
+with exception:\r
+| Traceback (most recent call last):\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/threadutil.py"=\r
+, line 156, in run\r
+| Thread.run(self)\r
+| File "/usr/lib/python2.7/threading.py", line 505, in run\r
+| self.__target(*self.__args, **self.__kwargs)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/folder/Base.py=\r
+", line 335, in copymessageto\r
+| new_uid =3D dstfolder.savemessage(uid, message, flags, rtime)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/folder/UIDMaps=\r
+.py", line 203, in savemessage\r
+| newluid =3D self._mb.savemessage(-1, content, flags, rtime)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/folder/IMAP.py=\r
+", line 575, in savemessage\r
+| (typ,dat) =3D imapobj.check()\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", =\r
+line 655, in check\r
+| return self._simple_command('CHECK', **kw)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", =\r
+line 1595, in _simple_command\r
+| return self._command_complete(self._command(name, *args), kw)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", =\r
+line 1360, in _command_complete\r
+| typ, dat =3D rqb.get_response('command: %s =3D> %%s' % rqb.name)\r
+| File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", =\r
+line 173, in get_response\r
+| raise typ(exc_fmt % str(val))\r
+| abort: command: CHECK =3D> socket error: <type 'exceptions.IOError'> - To=\r
+o many read 0\r
+|=20\r
+|=20\r
+| Last 5 debug messages logged for Copy message from RemoteRMKrugGMAIL:[Gma=\r
+il]/All Mail prior to exception:\r
+| thread: Register new thread 'Copy message from RemoteRMKrugGMAIL:[Gmail]/=\r
+All Mail' (account 'Gmail')\r
+| imap: Returned object from fetching 848831: 'Delivered-To: r.m.krug@gmail=\r
+.com\r
+| Received: by 10.58.66.162 with SMTP id g2csp15451vet;\r
+| Tue, 16 Apr 2013 01:52:56 -0700 (PDT)\r
+| X-Received: by 10...9EE04CABD9452A82EE740A1BB253BCSTBEXMB02stbsun_--\r
+|=20\r
+| '\r
+| imap: Write mail 'RMKrugGMAIL.[Gmail].All Mail:848831' with flags set([])\r
+| imap: Write mail 'RMKrugGMAIL.[Gmail].All Mail:-1' with flags set([])\r
+| imap: savemessage: date: "16-Apr-2013 08:45:15 +0100", content: 'Delivere=\r
+d-To: r.m.krug@gmail.com\r
+| Received: by 10.58.66.162 with SMTP id g2csp15451vet;\r
+| Tue, 16 Apr 2013 01:52:56 -0700 (PDT)\r
+| X-Received: by...E04CABD9452A82EE740A1BB253BCSTBEXMB02stbsun_--\r
+|=20\r
+| '\r
+| ERROR: Exceptions occurred during the run!\r
+| ERROR: command: CHECK =3D> socket error: <type 'exceptions.IOError'> - To=\r
+o many read 0\r
+`----\r
+\r
+\r
+My .offlineimaprc is as follow:\r
+\r
+,----\r
+| [general]\r
+| accounts =3D Gmail\r
+| maxsyncaccounts =3D 1\r
+| ignore-readonly =3D no\r
+|=20\r
+| [Account Gmail]\r
+| localrepository =3D LocalRMKrugGMAIL\r
+| remoterepository =3D RemoteRMKrugGMAIL\r
+| status_backend =3D sqlite\r
+| postsynchook =3D ionice -c 3 chrt --idle 0 /bin/sh -c "notmuch new && afe=\r
+w --tag --verbose --new"\r
+|=20\r
+| [Repository RemoteRMKrugGMAIL]\r
+| type =3D Gmail\r
+| sslcacertfile =3D /etc/ssl/certs/ca-certificates.crt\r
+| ######\r
+| remoteuser =3D XXXXXXXX\r
+| remotepass =3D YYYYYYYY\r
+| ######\r
+| maxconnections =3D 5\r
+| nametrans =3D lambda foldername: 'RMKrugGMAIL.' + foldername\r
+| ######\r
+|=20\r
+| [Repository LocalRMKrugGMAIL]\r
+| type =3D IMAP\r
+| remotehost =3D localhost\r
+| port =3D 143\r
+| ######\r
+| remoteuser =3D ZZZZZZZ\r
+| remotepass =3D PPPPPPP\r
+| ######\r
+| maxconnections =3D 5\r
+| ######\r
+| ## Remove RMKrugGMAIL prefix when copying to remote\r
+| nametrans =3D lambda folder: re.sub('^RMKrugGMAIL.', '', folder)\r
+| ######\r
+| folderfilter =3D lambda folder: folder.startswith('RMKrugGMAIL')\r
+| ######\r
+`----\r
+\r
+offlineimap version 6.5.4\r
+Ubuntu Quantal, all updates\r
+\r
+The syncing is approaching the end if I run offlineimap again after the\r
+crash.\r
+\r
+Any further info needed?\r
+\r
+Thanks,\r
+\r
+Rainer\r
+\r
+\r
+=2D-=20\r
+Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,=\r
+ UCT), Dipl. Phys. (Germany)\r
+\r
+Centre of Excellence for Invasion Biology\r
+Stellenbosch University\r
+South Africa\r
+\r
+Tel : +33 - (0)9 53 10 27 44\r
+Cell: +33 - (0)6 85 62 59 98\r
+Fax : +33 - (0)9 58 10 27 44\r
+\r
+Fax (D): +49 - (0)3 21 21 25 22 44\r
+\r
+email: Rainer@krugs.de\r
+\r
+Skype: RMkrug\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQEcBAEBAgAGBQJRbRdpAAoJENvXNx4PUvmCaOEH/icFDYY4zEMNCquRQ2nySg3n\r
+p23nBiVH/hxYD7tJvtYObTzP8X5ZpBMduZECY6N9wzrNI6IsbRDQs7T/ox9pwd3b\r
+euoHEU8K9D3Y/8EMneo+8Ek4yoKOO4o+TcvgqcP2KUtZzajg9Z2z21BqHI0yqvUn\r
+Qspq+30eUksFf7aR1galD6BzN788RchHSZPIU8V8WNnctuC9FH6JCCPSGnmxUXUz\r
+rBhfH1qk5stCXvDRVLhE7bBr0+S6UW1YfvC1/bTgdSKLE/UET6V2lXQx9dWUOhq0\r
+0MHjUTLfoEdibI8TVqYiBr4kpDjjgz1F4alClbxGxowtXDVwQD9EoWSQLf9gg54=\r
+=FqXG\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r