Re: Better Gmail handling by not using Notmuch tags
authorRainer M Krug <R.M.Krug@gmail.com>
Wed, 3 Oct 2012 08:10:23 +0000 (10:10 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:42 +0000 (09:49 -0800)
c4/9fd4a9acc9c6eaf0cf98f48825ae58199aa9d2 [new file with mode: 0644]

diff --git a/c4/9fd4a9acc9c6eaf0cf98f48825ae58199aa9d2 b/c4/9fd4a9acc9c6eaf0cf98f48825ae58199aa9d2
new file mode 100644 (file)
index 0000000..2f27ea1
--- /dev/null
@@ -0,0 +1,200 @@
+Return-Path: <gmn-notmuch@m.gmane.org>\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 4C4D1431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  3 Oct 2012 01:11:31 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.202\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.202 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2] 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 pVPV615rbul2 for <notmuch@notmuchmail.org>;\r
+       Wed,  3 Oct 2012 01:11:30 -0700 (PDT)\r
+Received: from plane.gmane.org (plane.gmane.org [80.91.229.3])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 06C01431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  3 Oct 2012 01:11:30 -0700 (PDT)\r
+Received: from list by plane.gmane.org with local (Exim 4.69)\r
+       (envelope-from <gmn-notmuch@m.gmane.org>) id 1TJK2r-0003tk-ID\r
+       for notmuch@notmuchmail.org; Wed, 03 Oct 2012 10:11:05 +0200\r
+Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7])\r
+       by main.gmane.org with esmtp (Gmexim 0.1 (Debian))\r
+       id 1AlnuQ-0007hv-00\r
+       for <notmuch@notmuchmail.org>; Wed, 03 Oct 2012 10:11:05 +0200\r
+Received: from R.M.Krug by arn78-1-88-186-171-7.fbx.proxad.net with local\r
+       (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00\r
+       for <notmuch@notmuchmail.org>; Wed, 03 Oct 2012 10:11:05 +0200\r
+X-Injected-Via-Gmane: http://gmane.org/\r
+To: notmuch@notmuchmail.org\r
+From: Rainer M Krug <R.M.Krug@gmail.com>\r
+Subject: Re: Better Gmail handling by not using Notmuch tags\r
+Date: Wed, 03 Oct 2012 10:10:23 +0200\r
+Lines: 131\r
+Message-ID: <k4grth$l6b$1@ger.gmane.org>\r
+References:\r
+ <CA+y5gghe68Sy6BK8FdeGbKEESFD_=2GQ+y+oZSYyt85oQqRuzA@mail.gmail.com>\r
+       <CA+eQo_0nK1rL6DYu2ERqF3U=vZAO_XTpXDtzydHQqBtXqHUOxQ@mail.gmail.com>\r
+       <CA+y5gghnzinnXiabFOEphAuWTJA5Uge9RtGbKu9ur5rP50i_5g@mail.gmail.com>\r
+       <5052E1A9.8060503@gmail.com>    <3wda9ws4ljo.fsf@testarossa.amd.com>\r
+ <5056D761.9@gmail.com>        <50573255.3000009@gmail.com>\r
+Mime-Version: 1.0\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: 7bit\r
+X-Complaints-To: usenet@ger.gmane.org\r
+X-Gmane-NNTP-Posting-Host: arn78-1-88-186-171-7.fbx.proxad.net\r
+User-Agent: Mozilla/5.0 (X11; Linux i686;\r
+       rv:16.0) Gecko/20120928 Thunderbird/16.0\r
+In-Reply-To: <50573255.3000009@gmail.com>\r
+X-Enigmail-Version: 1.5a1pre\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: Wed, 03 Oct 2012 08:11:31 -0000\r
+\r
+-----BEGIN PGP SIGNED MESSAGE-----\r
+Hash: SHA1\r
+\r
+Just to let you know, on the offlineimap there is also a discussion going on about gmail labels /\r
+folders / sync and it looks as if something is happening on that side:\r
+\r
+http://article.gmane.org/gmane.mail.imap.offlineimap.general/5915\r
+\r
+Would be nice, if this could work together nicely with notmuch.\r
+\r
+Cheers,\r
+\r
+Rainer\r
+\r
+\r
+\r
+On 17/09/12 16:23, Rainer M Krug wrote:\r
+> On 17/09/12 09:55, Rainer M Krug wrote:\r
+>> On 14/09/12 18:27, Mark Anderson wrote:\r
+>>> On Fri, 14 Sep 2012 09:50:01 +0200, Rainer M Krug \r
+>>> <R.M.Krug@gmail.com> wrote: On 13/09/12 17:15, Damien Cassou\r
+>>>  wrote:\r
+>>>>>> On Thu, Sep 13, 2012 at 5:13 PM, Jeremy Nickurak \r
+>>>>>> <not-much@trk.nickurak.ca> wrote:\r
+>>>>>>> Gmail doesn't have folders, of course, it has labels, which are approximately \r
+>>>>>>> equivalent to notmuch tags. The key difference being that a message can only be in \r
+>>>>>>> one folder, but it can have multiple tags/labels.\r
+>>>>>> \r
+>>>>>> Gmail exports its labels as IMAP folders: an email with multiple labels will be \r
+>>>>>> duplicated in multiple folders (one per label). That's why I'm asking if it would be\r
+>>>>>>  possible to manupale folders from Notmuch instead of tags.\r
+>>>>>> \r
+> \r
+>>> I don't think there is an easy solution. notmuch uses a maildir and tags. Gmail needs to be\r
+>>>  synced to this local maildir earlier, and this is where I think the problem comes in: I\r
+>>> am not aware of any sync tool which maintains the gmail labels, as they are in in the imap \r
+>>> context folders.\r
+> \r
+>>> I think the only real solution woud be:\r
+> \r
+>>> Download from gmail -> local: 1) download only the "All Mail" folder 2) implement a tagging\r
+>>>  tool which syncs the gmail labels to notmuch tags\r
+> \r
+>>>> Gmail's IMAP protocol does expose a folder hierarchy which you can use to reverse\r
+>>>> engineer the tag cloud of each email.\r
+> \r
+> \r
+>> <<SNIP a lot>>\r
+> \r
+>> Wow - I learned a lot about notmuch and how things can be done - thanks for this\r
+>> explanation.\r
+> \r
+> Thinking about it again - wouldn't it be possible, that notmuch automatically is doing the\r
+> "folder --> tag" step (when a corresponding option is set), and automatically adds all the\r
+> folders to the message tags when the same message-id is encountered in different folders?\r
+> \r
+> Rainer\r
+> \r
+> \r
+>>>> Of course this is terrible on performance, as you will have lots of\r
+> \r
+>> I guess this will be the problem: a typical gmail user, keeps the emails - one has 10GB as \r
+>> storage, so why delete potentially important mails?\r
+> \r
+>> So I guess this would be a case for e.g. offlineimap.\r
+> \r
+>>>> copies of mails when you have lots of tags on your mail, but here's a summary of the \r
+>>>> actions you need to coordinate to keep them in sync.\r
+> \r
+>> <SNIP>>\r
+> \r
+>>>> The benefit of using the mail sync is it uses a widely distributed mail synchronization \r
+>>>> model, but it really tags expensive to synchronize.  It gets better if you use the Gmail \r
+>>>> imap extensions that can list the tags without your client requesting a copy of the\r
+>>>> entire email for each tag the mail has.  However, Even when you have that, you don't\r
+>>>> have bulletproof mail, because the actions need to be guaranteed to complete before \r
+>>>> synchronization and after synchronization, and any user changes need to be held off, as \r
+>>>> they _will_ be interpreted incorrectly if they take place during the pre-sync, sync, \r
+>>>> post-sync window.\r
+> \r
+>> It would then definitely be useful to include this in offlineimap - effectively have a \r
+>> "tagging" sync model, where only the "All Mail" folder is synched, and for the tags, a\r
+>> database is kept, which contains the tags for each message-id. This could then be used from\r
+>> notmuch (or other clients) to set the tags of the email.\r
+> \r
+>> For the moment I guess I will stick with my only-"All Mails"-sync-and-ignore-tags approach.\r
+> \r
+>> Thanks,\r
+> \r
+>> Rainer\r
+> \r
+> \r
+> \r
+>>>> You can simplify this if you make guarantees in your usage model.  That you will never do\r
+>>>>  tagging operations during a pre-, sync, post- cycle, or that you only do\r
+>>>> synchronization one way or the other, instead of full bidirectional sync.\r
+> \r
+>>>> It's a difficult problem, I look forward to seeing other solutions proposed.\r
+> \r
+>>>> Thanks, -Mark Anderson\r
+> \r
+>>> upload local -> gmail 1) upload "All Mail folder 2) assign on gmail the labels\r
+>>> corresponding to the notmuch tags.\r
+> \r
+>>> The step 1 could be done by any sync tool available for this (offlineimap, ...)\r
+> \r
+>>> step 2 needs to be developed - no idea how, but it surely would be really usefull, because\r
+>>>  then notmuch would even become a perfect tool for gmail backup as well.\r
+> \r
+>>> Cheers,\r
+> \r
+>>> Rainer\r
+>>>> \r
+>>>> _______________________________________________ notmuch mailing list \r
+>>>> notmuch@notmuchmail.org \r
+>>>> http://notmuchmail.org/mailman/listinfo/notmuch\r
+>>>> \r
+> \r
+> \r
+> \r
+> \r
+> \r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+Comment: Using GnuPG with Mozilla - http://www.enigmail.net/\r
+\r
+iEYEARECAAYFAlBr8u8ACgkQoYgNqgF2ego61QCfdmtzB1qPuShRYxFpRoNLspzT\r
+pfAAn05wVADqKB5qy031TK0+p32ICrBD\r
+=54M8\r
+-----END PGP SIGNATURE-----\r
+\r