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 8E5DB431FD0 for ; Tue, 25 Jan 2011 02:00:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 vkdFp-b9NR7S for ; Tue, 25 Jan 2011 02:00:31 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id AA809431FB6 for ; Tue, 25 Jan 2011 02:00:31 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id AC5D319F32FC; Tue, 25 Jan 2011 11:00:30 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id Am6hLRAHj96t; Tue, 25 Jan 2011 11:00:29 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 6254619F3312; Tue, 25 Jan 2011 11:00:29 +0100 (CET) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 85EE515C031; Tue, 25 Jan 2011 11:00:27 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1PhfhL-0004zC-O1; Tue, 25 Jan 2011 11:00:27 +0100 From: Michal Sojka To: David Mazieres expires 2011-02-24 PST , notmuch@notmuchmail.org Subject: Re: Tag timestamps and synchronization In-Reply-To: References: User-Agent: Notmuch/0.5-87-g9705d00 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 25 Jan 2011 11:00:27 +0100 Message-ID: <87lj29i9qc.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 10:00:32 -0000 On Mon, 24 Jan 2011, dm-list-email-notmuch@scs.stanford.edu wrote: > One of the features I would like to see from notmuch is an easier > ability to synchronize tags across machines. At the very least, I > would need either incremental dump and restore, or some way to > communicate arbitrary tags to a local imap server that shares > notmuch's maildir (much as notmuch currently syncs the standard tags), > so that I synchronize two maildirs with a tool like offlineimap. [...] > In the case of dovecot, the arbitrary tag format is very simple. Each > maildir has a file called dovecot-keywords mapping numbers 0, 1, > ... to keywords. Then mail file names contain lower-case letters for > the flags they are marked with--0 => a, 1 => b, etc.--allowing up to > 26 arbitrary tags for each maildir. One could probably sync to > dovecot's maildir format relatively easily in a script given > incremental dump and restore of tags. Or possibly notmuch could > natively support dovecot as one of multiple back-end tag storage > schemes. Hi David, here is my idea of solving the problem of synchronizing tags and all message metadata. The problem, it seems, is that every program uses a different format for message metadata. Maybe, it would be useful to define a simple metadata format that could be used by multiple programs (at least by notmuch, dovecot and maybe mutt) and base the synchronization on this format. Currently, I'm thinking about a separate file with the same base name as the message storing message metadata in the same format as message headers so it could look like: tag: inbox tag: notmuch timestamp: 2011-01-25 10:48:00 GMT spam: no ... Then, any program could do whatever it wants with the metadata, e.g. index them in a database etc. In the ideal it would work like this: Dovecot would store the metadata in a file like described above. IMAP protocol would be extended to be able to send such metadata corresponding to a particular UID. offlineimap would be able to retrieve (and synchronize) the metadata files with the IMAP server and notmuch would index the metadata similarly as it index messages and would modify them when it change tags. What do you (and others) think? Is this too wild? Too longterm? Cheers Michal