From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.52.162.5 with SMTP id xw5csp56867vdb; Wed, 3 Jul 2013 02:50:13 -0700 (PDT) X-Received: by 10.60.52.16 with SMTP id p16mr76741oeo.29.1372845012573; Wed, 03 Jul 2013 02:50:12 -0700 (PDT) Return-Path: Received: from rubyforge.org ([50.56.192.79]) by mx.google.com with ESMTP id wd10si7571598obc.67.2013.07.03.02.50.11 for ; Wed, 03 Jul 2013 02:50:12 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (bad format) header.i=@gmail.com Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BE83D2E156; Wed, 3 Jul 2013 09:50:11 +0000 (UTC) X-Greylist: delayed 310 seconds by postgrey-1.31 at rubyforge; Wed, 03 Jul 2013 09:50:03 UTC Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by rubyforge.org (Postfix) with ESMTP id 1D6902E14F for ; Wed, 3 Jul 2013 09:50:03 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id n9so7712251oag.22 for ; Wed, 03 Jul 2013 02:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HRQTqWb6BnPB1ypWpYVoiKRVrB+cD6ekyrdvIQCbLOg=; b=I8q9OzL7ev4qoSOIwyIApOwovzP3mK12k/VjDRcKQVffUeFwo+KV6W0hsBr5pvSoZN DDy/o7gsayC+m8KqHCCwOVdzOXBmj+Koz/7jXLVuBA7IgFAmDDIVBxZ+APAN08qcl7c9 UMKRETJrccMHsy8I0tBOD17qW8swOLIdbGe3/UWcLY1kMrgbaUzprqwdb9LogDzti62+ /UBFxgMwoKZDX/XYfNSvsPmRF3bU5/6dYqTPZ/GZsms/lvtqOdM8Ekvb5xLMM4sqDfaw GGUrg2PDIijoi1gui6ZvIbIdZ5nt8CPNBOzi7Y+WYCB7P95+8HUsl+76XKbfvOBVeRn0 v1BQ== MIME-Version: 1.0 X-Received: by 10.182.144.231 with SMTP id sp7mr88595obb.14.1372844689660; Wed, 03 Jul 2013 02:44:49 -0700 (PDT) Received: by 10.182.8.102 with HTTP; Wed, 3 Jul 2013 02:44:49 -0700 (PDT) Date: Wed, 3 Jul 2013 18:44:49 +0900 Message-ID: From: Horacio Sanson To: Sup developer discussion Subject: [sup-devel] Gmail source sync back. X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7522573022811962015==" Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --===============7522573022811962015== Content-Type: multipart/alternative; boundary=089e0153686c0f21da04e0985063 --089e0153686c0f21da04e0985063 Content-Type: text/plain; charset=ISO-8859-1 I finally got the sync back feature of the Gmail source working. The sync code uses the offlineimap sync algorithm the Matthieu mentioned some emails ago. So far it works ok with my small tests but this code should be considered alpha so do not test it with your work emails. https://github.com/hsanson/sup/tree/gmail_source I also added some fixes and the config option provided by Matthieu. Testing and feedback is greatly appreciated. Issues to solve: - Sync back flags: Not sure if this is needed or how it may work. All messages I get from Gmail have the \Seen flag no matter if I have seen or not the message on Gmail web interface. The \Flagged flag can be changed using the \Starred label instead. The only flag that I really need to care about is the \Deleted flag. - How to refresh the index after polling finishes? When new labels are synced from Gmail to Sup the index is not updated with the new labels until I reload sup or press "@" to refresh the index. Is there a callback to refresh the index when the polling finishes? - Sync back iterates over all messages in the Gmail account checking for differences between message labels. This can take a long time and may not finish before the next polling starts. How to do this efficiently? regards, Horacio Sanson --089e0153686c0f21da04e0985063 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I finally got the sync back feature of the Gmail source wo= rking. The sync code uses the offlineimap sync algorithm the Matthieu menti= oned some emails ago.

So far it works ok with my s= mall tests but this code should be considered alpha so do not test it with = your work emails.

https://github.com/hsanson/sup/tree/gmail_source
<= /div>

I also added some fixes and the config= option provided by=A0Matthieu.

Testing and feedback is greatly appreciated= .

Issues to solve:
- Sync back flags: Not sure if this is needed or how it m= ay work. All messages I get from Gmail have the \Seen flag no matter if I h= ave seen or not the message on Gmail web interface. The \Flagged flag can b= e changed using the \Starred label instead. The only flag that I really nee= d to care about is the \Deleted flag.

- How to refresh the index after polling fi= nishes? When new labels are synced from Gmail to Sup the index is not updat= ed with the new labels until I reload sup or press "@" to refresh= the index. Is there a callback to refresh the index when the polling finis= hes?

- Sync back iterates over all messages in t= he Gmail account checking for differences between message labels. This can = take a long time and may not finish before the next polling starts. How to = do this efficiently?

regards,
Horacio Sanson
--089e0153686c0f21da04e0985063-- --===============7522573022811962015== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --===============7522573022811962015==--