From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [192.168.1.207] (c4C8F5BC1.dhcp.as2116.net. [193.91.143.76]) by mx.google.com with ESMTPSA id i1sm2124494lbi.9.2013.05.11.03.16.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 May 2013 03:16:22 -0700 (PDT) Message-ID: <518E1A2B.2080903@gaute.vetsj.com> Date: Sat, 11 May 2013 12:15:07 +0200 From: Gaute Hope User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130403 Thunderbird/17.0.5 MIME-Version: 1.0 To: Sup developer discussion CC: Horacio Sanson Subject: Re: [sup-devel] Experimental Gmail Source References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09. mai 2013 11:28, Horacio Sanson wrote: > I am trying to implement a new source for Gmail accounts. This is > copied from my efforts to do the same in Heliotrope. > > Here is an experimental implementation that can read the email from > Gmail and add it to the Sup index: > > https://github.com/hsanson/sup/tree/gmail_source > > To use: > > - Install leveldb gem "sudo gem install leveldb-ruby" - Add a gmail > source: sup-add gmail://username@gmail.com - Start sup and see how > it syncs your emails. > > Warnings: > > - This is experimental - This always syncs only the All mailbox so > make sure to use an account with not too many emails for testing. - > All email data and headers are stored in a LevelDB database at: > ~/.sup/gmail/account > > - For some reason I get duplicate "Inbox" and "Sent" labels in the > list of labels and I am not sure why. > - I still have no clue on how to handle sync-back. That is how to propagate > changes made in sup > back to Gmail. Any tips on how the maildir source does it would be > appreciated. Hi Horacio, nice work. Working directly with GMail labels is probably a good idea (the other option is to move messages between IMAP folders). I have a design question though: Should remote sources be part of regular sup? Or should rather the fetching and syncing be put in a separate script which creates a LevelDB setup like you have it with a Gmail source in sup working directly on it? Recall that the IMAP source was removed in 52e29ba [1] (discussion probably on the mailinglist somewhere). I like this approach for GMail, but I would like to see it for regular IMAP sources as well with folders as labels.. I briefly experimented with a maildir-root folder approach [2] which treats all underlying maildirs as sources which correspond to a label (do not use, incomplete). It of course presents a plethora of questions on how to sync messages between labels, but implementing it is is probably relatively straight forward. > Help: > > - How do I stop the source poll when I quit sup? If I have a large > amount of emails when polling is running and I quit sup the process > hangs there. This normally runs in a separate thread, I don't think maildir really stops the polling - so I sometimes get an error if I quit sup while the polling is running and various stuff just disappears underneath the poller. I don't have the chance to get into your other questions at the moment. Regards, Gaute [1] https://github.com/sup-heliotrope/sup/commit/52e29ba [2] https://github.com/gauteh/sup/tree/maildir-root