From 147d20015e9a90d717c73e678457ccce74d0b037 Mon Sep 17 00:00:00 2001 From: Rainer M Krug Date: Fri, 7 Dec 2012 14:57:23 +0100 Subject: [PATCH] Re: gmail importer script --- 05/7619283abcf3b5be8dded7bc485d7cc7835fbc | 184 ++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 05/7619283abcf3b5be8dded7bc485d7cc7835fbc diff --git a/05/7619283abcf3b5be8dded7bc485d7cc7835fbc b/05/7619283abcf3b5be8dded7bc485d7cc7835fbc new file mode 100644 index 000000000..07a9a19e3 --- /dev/null +++ b/05/7619283abcf3b5be8dded7bc485d7cc7835fbc @@ -0,0 +1,184 @@ +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 3C58D431FB6 + for ; Fri, 7 Dec 2012 05:57:31 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Eo0fLN6cXMJz for ; + Fri, 7 Dec 2012 05:57:30 -0800 (PST) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5FB21431FAE + for ; Fri, 7 Dec 2012 05:57:30 -0800 (PST) +Received: by mail-bk0-f53.google.com with SMTP id j5so257855bkw.26 + for ; Fri, 07 Dec 2012 05:57:27 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject + :references:in-reply-to:x-enigmail-version:content-type + :content-transfer-encoding; + bh=424wBJ1DPaj7swj0bHBqtW5r1DeACcc9nEok0Yq3LJM=; + b=OdIIrDlkfOAxR3An+iT1wZ+NhuNvRA892BD4uR+5XgvwR5Fxfl6aLkFyK54pPIuiG/ + sC6wfCcupBmFDZ7GNX12/kcLLSdZ5dbbbfK1SkeV7h/LaLKN9J5USuhjXQlXVFhRbffu + VhTXfy4v2cMexGYVAvepDWtU16XiPw/B4yO0TDTOsTwgX/w8Sl8bXwRZY6G96A1fsrt0 + LPGnNmAZuGV2iwi1Y91zckEC1LxNc0qNQiwLHAPX8ckd/hwVEco+OHotGDnSql5mdH+1 + ZOMeQAMADb6S7cY8qRsaDaW/F8Og04YO6Nx+8poI6s2zbCPUIUv99/EQpjZLMO4G6z9u + NgOQ== +Received: by 10.204.129.214 with SMTP id p22mr1930381bks.47.1354888646337; + Fri, 07 Dec 2012 05:57:26 -0800 (PST) +Received: from ?IPv6:2a01:e35:8baa:b070:741d:77d0:b9d:1d94? + ([2a01:e35:8baa:b070:741d:77d0:b9d:1d94]) + by mx.google.com with ESMTPS id u3sm9186735bkw.9.2012.12.07.05.57.24 + (version=SSLv3 cipher=OTHER); Fri, 07 Dec 2012 05:57:25 -0800 (PST) +Message-ID: <50C1F5C3.6010201@gmail.com> +Date: Fri, 07 Dec 2012 14:57:23 +0100 +From: Rainer M Krug +User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 +MIME-Version: 1.0 +To: "Jason A. Donenfeld" +Subject: Re: gmail importer script +References: + + <50c16b03.47e2440a.6038.ffffedce@mx.google.com> <50C1AEA0.9090508@gmail.com> + +In-Reply-To: + +X-Enigmail-Version: 1.5a1pre +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org, + notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +Reply-To: Rainer@krugs.de +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:57:31 -0000 + +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +On 07/12/12 14:48, Jason A. Donenfeld wrote: +> +> +> On Fri, Dec 7, 2012 at 9:53 AM, Rainer M Krug > +> wrote: +> +> Sounds interesting. +> +> I don't know much python, so excuse my questions: +> +> 1) are multiple downloads of an email done, if the mail has multiple labels? +> +> +> No. + +Good. + +> +> +> 2) I am downloading with the patched notmuch (to add x-keywords containing the labels) only +> the "All Mail" folder - does your script use this information (if present) to tag the emails? +> +> +> What is the patched notmuch? What does that do? + +Sorry - should have been "patched offlineimap" ( https://github.com/aroig/offlineimap +http://thread.gmane.org/gmane.mail.imap.offlineimap.general/5943/focus=5970 and +http://article.gmane.org/gmane.mail.imap.offlineimap.general/5970 ) + +It is synching the gmail labels into the x-keywords header as a comma separated list. These could +then be used by notmuch to be added to the labels. It also does sync changes from the X-Keywords +to gmail (see http://thread.gmane.org/gmane.mail.imap.offlineimap.general/5943/focus=5970 for details) + +> +> +> 3) are label changes in gmail synched into the local emails? +> +> +> It pulls labels from gmail messages into notmuch, with the labels in tact, once per each +> email. + +Good. + +> +> +> 4) I assume, local changes are not synced to gmail? +> +> +> Correctamundo. +> + +OK. + +> +> +> 5) how are conflicts handled (local tag changes versus label changes on gmail)? +> +> +> They aren't. See 3. +> + +Thanks, + +Rainer + + +> +> +> Thanks, +> +> Rainer -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG +> with Mozilla - http://www.enigmail.net/ +> +> iEYEARECAAYFAlDBrqAACgkQoYgNqgF2egqrEwCeOSr5TGZgAIaRvzHCl1Nv+DBk +> ko4AnRT0FMBwYNRGzSclXxZXzaH0Q23x =Sx0B -----END PGP SIGNATURE----- +> +> _______________________________________________ notmuch mailing list notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch +> +> + + +- -- +Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. +(Germany) + +Centre of Excellence for Invasion Biology +Stellenbosch University +South Africa + +Tel : +33 - (0)9 53 10 27 44 +Cell: +33 - (0)6 85 62 59 98 +Fax : +33 - (0)9 58 10 27 44 + +Fax (D): +49 - (0)3 21 21 25 22 44 + +email: Rainer@krugs.de + +Skype: RMkrug +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) +Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ + +iEYEARECAAYFAlDB9cMACgkQoYgNqgF2egrEkACeLD9p4CUW3EhliFQ44cigpZdF +o8AAnA9M8tmw52W3m62QFJaFuoOLdto2 +=6Zrk +-----END PGP SIGNATURE----- -- 2.26.2