From: Jason A. Donenfeld Date: Fri, 7 Dec 2012 13:49:46 +0000 (+0100) Subject: Re: gmail importer script X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b2c1250f41683bb45b39456c7ab9da4f05ff42f0;p=notmuch-archives.git Re: gmail importer script --- diff --git a/c3/660ad2d808edf968b6c0127c50201d929f9fbf b/c3/660ad2d808edf968b6c0127c50201d929f9fbf new file mode 100644 index 000000000..750782b56 --- /dev/null +++ b/c3/660ad2d808edf968b6c0127c50201d929f9fbf @@ -0,0 +1,201 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 97276431FB6 + for ; Fri, 7 Dec 2012 05:49:49 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.099 +X-Spam-Level: +X-Spam-Status: No, score=-0.099 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id O2WfDsP14z4f for ; + Fri, 7 Dec 2012 05:49:49 -0800 (PST) +X-Greylist: delayed 48332 seconds by postgrey-1.32 at olra; + Fri, 07 Dec 2012 05:49:48 PST +Received: from homiemail-a61.g.dreamhost.com (caiajhbdccah.dreamhost.com + [208.97.132.207]) + by olra.theworths.org (Postfix) with ESMTP id C6B5D431FAE + for ; Fri, 7 Dec 2012 05:49:48 -0800 (PST) +Received: from homiemail-a61.g.dreamhost.com (localhost [127.0.0.1]) + by homiemail-a61.g.dreamhost.com (Postfix) with ESMTP id 08914578073 + for ; Fri, 7 Dec 2012 05:49:47 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version + :in-reply-to:references:date:message-id:subject:from:to:cc: + content-type; s=zx2c4.com; bh=VSX4X9fqHCIXgkcbkWPR2fAMn/A=; b=Gv + JO81FYMPGIiW8q+mQV8X33NvnMqHtQsYn74mc6pD7a0s/U7ymN6u/cZEwCWeLtYn + d5c6pgW5+KeSW3PODn/7HxacqC8X9B8/jQwg3QK1p/mjAo3kZ/1qwDsXTdTOSLcj + 2L5YdlKFBoKm6BftgNWArs6dcqemGSbn57SkAb99o= +Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com + [209.85.214.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + (Authenticated sender: jason@zx2c4.com) + by homiemail-a61.g.dreamhost.com (Postfix) with ESMTPSA id D30BE57806E + for ; Fri, 7 Dec 2012 05:49:46 -0800 (PST) +Received: by mail-ob0-f181.google.com with SMTP id oi10so416438obb.26 + for ; Fri, 07 Dec 2012 05:49:46 -0800 (PST) +MIME-Version: 1.0 +Received: by 10.182.130.99 with SMTP id od3mr3176568obb.61.1354888186324; Fri, + 07 Dec 2012 05:49:46 -0800 (PST) +Received: by 10.76.33.70 with HTTP; Fri, 7 Dec 2012 05:49:46 -0800 (PST) +In-Reply-To: <20121207092305.4942.42415@megatron> +References: + + <50c16b03.47e2440a.6038.ffffedce@mx.google.com> <50C1AEA0.9090508@gmail.com> + <20121207092305.4942.42415@megatron> +Date: Fri, 7 Dec 2012 14:49:46 +0100 +Message-ID: + +Subject: Re: gmail importer script +From: "Jason A. Donenfeld" +To: Patrick Totzke +Content-Type: multipart/alternative; boundary=14dae93b61340e663e04d0437d93 +Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org, + notmuch@notmuchmail.org, Rainer M Krug +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 07 Dec 2012 13:49:49 -0000 + +--14dae93b61340e663e04d0437d93 +Content-Type: text/plain; charset=ISO-8859-1 + +On Fri, Dec 7, 2012 at 10:23 AM, Patrick Totzke wrote: + +> Is this supposed to happen? +> + +Obviously not. + + + +> +> --------------------------------------------- +> Logging in... +> Selecting all mail... +> Discovering local messages... +> Receiving message list... +> Traceback (most recent call last): +> File "./gmail-notmuch.py", line 175, in +> main() +> File "./gmail-notmuch.py", line 58, in main +> new_messages = discover_new_messages(imap, old_messages) +> File "./gmail-notmuch.py", line 80, in discover_new_messages +> typ, data = imap.fetch("1:*", "X-GM-MSGID") +> File "/usr/lib/python2.7/imaplib.py", line 443, in fetch +> typ, dat = self._simple_command(name, message_set, message_parts) +> File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_command +> return self._command_complete(name, self._command(name, *args)) +> File "/usr/lib/python2.7/imaplib.py", line 825, in _command +> ', '.join(Commands[name]))) +> imaplib.error: command FETCH illegal in state AUTH, only allowed in states +> SELECTED +> +> +Not sure what is causing this. My best guess is that your password was +incorrect and that I'm not checking the login return value. + + + +> ------------------------------------------------------ +> +> +> In [2]: imaplib.__version__ +> Out[2]: '2.58' +> +> One thing you also might want to watch out for is +> exceptions due to a locked notmuch index. +> + +How do I do this? + + + +> rock on, +> /p +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch +> + +--14dae93b61340e663e04d0437d93 +Content-Type: text/html; charset=ISO-8859-1 +Content-Transfer-Encoding: quoted-printable + +

On Fri, Dec 7, 2012 at 10:23 AM, Patrick= + Totzke <patricktotzke@gmail.com> wrote:
+Is this supposed to happen?

Obviously n= +ot.

=A0
+
+---------------------------------------------
+Logging in...
+Selecting all mail...
+Discovering local messages...
+Receiving message list...
+Traceback (most recent call last):
+=A0 File "./gmail-notmuch.py", line 175, in <module>
+=A0 =A0 main()
+=A0 File "./gmail-notmuch.py", line 58, in main
+=A0 =A0 new_messages =3D discover_new_messages(imap, old_messages)
+=A0 File "./gmail-notmuch.py", line 80, in discover_new_messages<= +br> +=A0 =A0 typ, data =3D imap.fetch("1:*", "X-GM-MSGID") +=A0 File "/usr/lib/python2.7/imaplib.py", line 443, in fetch
+=A0 =A0 typ, dat =3D self._simple_command(name, message_set, message_parts)= +
+=A0 File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_c= +ommand
+=A0 =A0 return self._command_complete(name, self._command(name, *args))
+=A0 File "/usr/lib/python2.7/imaplib.py", line 825, in _command +=A0 =A0 ', '.join(Commands[name])))
+imaplib.error: command FETCH illegal in state AUTH, only allowed in states = +SELECTED
+

Not sure what is causing this. My best= + guess is that your password was incorrect and that I'm not checking th= +e login return value.

=A0
+ +------------------------------------------------------
+
+
+In [2]: imaplib.__version__
+Out[2]: '2.58'
+
+One thing you also might want to watch out for is
+exceptions due to a locked notmuch index.

How do I do this?

=A0
+ +rock on,
+/p
+
___________________________________= +____________
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+ +--14dae93b61340e663e04d0437d93--