[PATCH 0/4] Re: implement syncing dovecot imap flags to remote repo

Dan Christensen jdc at uwo.ca
Wed Aug 22 03:07:29 UTC 2012


Nicolas Sebrecht <nicolas.s-dev at laposte.net> writes:

> On Sat, Aug 18, 2012 at 10:38:58AM -0400, Dan Christensen wrote:
>> Igor Mammedov <imammedo at redhat.com> writes:
>> 
>> > If MailDir is used by dovecot, it creates dovecot-keywords file there to
>> > provide mapping beteewn non sandard imap flags and lower case letter
>> > flags used by dovecot to tag messages.
>> > patchset allow uses this fact and adds to offlineimap ability to sync
>> > imap flags (tags) back and forth.
>> > For now it's necessary for dovecote to know about imap flag (flag should
>> > be in dovecot-keywords file) when it's synced from remote repo, unknown
>> > flags from remote repo will be ignored.
>> 
>> Can you explain a bit more?  Is this for IMAP <--> Maildir syncing,
>> where the local Maildir is also controlled by dovecot?  If so, that's a
>> clever idea.
>
> I don't get it. What could be the use case of such configuration?

I'm not the author, and I didn't look closely at the patch, but here is
my guess:  Suppose you are syncing a remote IMAP server (any flavour)
with a local dovecot server, but you are accessing dovecot's Maildir
directly rather than via dovecot.  (An IMAP <--> Maildir sync.)  IMAP
can have arbitrary multi-character flags.  dovecot stores them in the
Maildir by mapping each one it sees to a new single character, and it
remembers the mapping in dovecot-keywords.  With the patch, when
offlineimap sees a flag on the remote IMAP server, it can look in the
local dovecot-keywords file to see what single character dovecot has
mapped that to, and then stores that single character flag in the local
Maildir.  Then when the user access the Maildir via dovecot, dovecot 
will show the original flag that was on the remote message.

The "IMAP keywords" section of this page

  http://wiki2.dovecot.org/MailboxFormat/Maildir

explains more.

I think this patch might be too server specific.  As I mentioned, I
think it would be better to simply use IMAP <--> IMAP sync, and let
multi-character flags pass through unchanged.  This would solve the flag
syncing problem for people who use any IMAP server.

Dan




More information about the OfflineIMAP-project mailing list