From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.223.78.141 with SMTP id l13cs43263fak; Sun, 13 Mar 2011 09:41:23 -0700 (PDT) Received: by 10.42.148.9 with SMTP id p9mr1432198icv.19.1300034481957; Sun, 13 Mar 2011 09:41:21 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id i10si16794555iby.38.2011.03.13.09.41.20; Sun, 13 Mar 2011 09:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 39CB5185835A for ; Sun, 13 Mar 2011 12:41:20 -0400 (EDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by rubyforge.org (Postfix) with ESMTP id 5339C1858346 for ; Sun, 13 Mar 2011 12:41:10 -0400 (EDT) Received: by wyj26 with SMTP id 26so4406224wyj.23 for ; Sun, 13 Mar 2011 09:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:content-type:subject:from:to:in-reply-to :references:date:message-id:user-agent:content-transfer-encoding; bh=80OVbeSV0xk0qsrbvaLFwMI1hVIl4H/STkPQK+X6NpA=; b=HAHA7PhapDn6K2jNDT0+o4cmdqowqip9+FkpAw3L3URZ1uT2EqRNtQK/g396BfDrlj jgelQqDH/0Q5TeSoYj5DGVMHNYgQeDtu6jt0wqvySdTvwK3ziLRPkOXkyNfI0WKVsHsI y0LKwbythdTx4tyw0vf7WP/iEPh0nGVBVtI8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:subject:from:to:in-reply-to:references:date :message-id:user-agent:content-transfer-encoding; b=q4OtkVxtuMJtV37GAMTzGzFYugNmhnv0hQIeOi3xnIOzdHKLRp+ClzwdC9cppmj+wH RldJDaey5DkbxArupT2wcInG+qOY284MqQj3SMDIRCFWD3KoJJuot2WIzHgcumBSNA5v 8VkhxkVNGtrqLZFDHOo4NjwpckX7G5FRhpbkY= Received: by 10.216.72.201 with SMTP id t51mr1565148wed.6.1300034468996; Sun, 13 Mar 2011 09:41:08 -0700 (PDT) Received: from localhost (mut38-4-82-233-117-144.fbx.proxad.net [82.233.117.144]) by mx.google.com with ESMTPS id n52sm3348147wer.0.2011.03.13.09.41.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Mar 2011 09:41:06 -0700 (PDT) From: Damien Leone To: sup-devel In-reply-to: <1278693172-sup-6247@mailer> References: <1278693172-sup-6247@mailer> Date: Sun, 13 Mar 2011 17:41:04 +0100 Message-Id: <1300032886-sup-4779@mailer> User-Agent: Sup/git Subject: Re: [sup-devel] Adding backward synchronization for Maildir sources 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: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Sup guys, Sorry for having been so long. What's new: - I added an option in sup-sync-back-maildir to merge the :replied and :forwarded labels/flags so the first time you run the script you should not lose any information on the IMAP side; - A way to detect if sup-sync-back-to-maildir should be executed in order to synchronize your index back to the Maildir source in order to prevent any loss of information. A magic file is written in the configuration directory everytime the script is executed and it is removed when the sync_back_to_maildir option is set from false to true; - I fixed a case when messages were not properly updated when they were remotely modified. I have pushed the last commits to the maildir-sync branch [0], it is rebased from master. I also have a branch rebased from next on my own repository if you'd rather a more up to date branch [1]. Please test and review! For more informations and a howto, read the message quoted below this mail. [0] http://gitorious.org/sup/mainline/commits/maildir-sync [1] http://git.fensalir.fr/?p=dleone/sup.git Excerpts from Damien Leone's message of ven. juil. 09 18:44:01 +0200 2010: > Sup guys, > > I have been working on backward synchronization for Maildir sources > last week and I need your help to test and review the code. > > I pushed my commits (based on the 'next' branch) to my repo which you > can find here [0] for the web interface and here [1] for the git > address. > > The following is related to Maildir sources ONLY. > > So what does work and what does not (if you don't want to read this, > scroll to the quick howto below): > > - Sup will now stay synchronized with your remote sources by detecting > if a message has been remotely updated (ie: you change a flag from > another client), these updates will be applied to your local index and > your thread-view-mode buffers should be properly refreshed; > > - When a message is remotely deleted, it should now disappear from > your index; > > - There is a new configuration option called "sync_back_to_maildir" > which is false by default. When true, this option updates your actual > Maildir files when you change a label, this is done in real time > before being saved to xapian. So for instance if you use offlineimap > the changes should be synched back to your IMAP server by the next > poll in Sup (assuming that your before-poll hook runs offlineimap); > > - I wrote a "sup-sync-back-maildir" script that will synchronize all > messages from your sources at once. This should be executed the first > time BEFORE any polling, otherwise your IMAP server will be synched to > your Sup index and if you did not used another client to mark your > emails as read etc. (like me) and to update your IMAP server then you > will lose all what you did in Sup (labels, etc.); > > - I added two new hidden labels in Sup: 'replied' and 'forwarded', > they are automatically added when replying, forwarding or bouncing a > message, this is to bring a better Maildir support to Sup, this should > be invisible for users; > > - However you will probably lose all your remote 'replied' and > 'forwarded' flags after your first backward synchronization to Maildir > since Sup dropped these labels when it added your messages to xapian. > > - Moving a message from a Maildir source to another is not (yet?) > supported. > > So, you should now be able to use multiple clients to handle your > emails, for instance I can use gmail to mark messages as starred or > so, it will be reflected in Sup. In the same way, if I mark a message > as read in Sup it will appear as read in the gmail web interface. > > I tested this code with my main account (2 GB and like 15 Maildir > sources) it works fine so far. > > Be warned that it is highly experimental, but if you use offlineimap > it has a realdelete option so you *should* not lose any email, in the > worst case it might mess your flags/labels up. > > I tested it only with offlineimap working with a gmail account. > > Quick howto: > > 1. Close sup > 2. Backup your emails and your xapian index or use another Sup session > 3. Clone the branch [1] > 4. IMPORTANT: run "bin/sup-sync-back-maildir" to synchronize the > Maildirs you wish, check the help > 5. Add ":sync_back_to_maildir: true" to your config.yaml > 6. Run and use sup > > Please test it and make reviews! :) > > NOTE: if you want this to work, get sure that you are not calling > offlineimap with the '-q' option (as suggested in the wiki) otherwise > it will ignore the flag updates on IMAP server, so check your > before-poll hook. > > [0] http://git.fensalir.fr/?p=dleone/sup.git > [1] $ git clone git://fensalir.fr/dleone/sup.git -b maildir-sync > -- Damien Leone Web: http://dleone.fensalir.fr/ GPG: 0x82EB4DDF _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel