[patch] Re: Fix the logic for updating maildir flags.

Daniel Shahaf d.s at daniel.shahaf.name
Fri Jan 6 18:56:25 GMT 2012

Sebastian Spaeth wrote on Fri, Jan 06, 2012 at 19:31:54 +0100:
> On Fri, 6 Jan 2012 19:29:24 +0200, Daniel Shahaf wrote:
> > Does that answer your question?  If not, I'd appreciate a clarification
> > (especially on the maildir side of things).
> Yes, that helps me. The thing is, imagine this:
> IMAP   : msg1:2,
> Maildir: msg1:2,a
> Now the mail gets read on the IMAP side:
> IMAP   : msg1:2,S
> Maildir: msg1:2,a

Would it be more accurate to depict the situation as:

    IMAP: msg1:2,S
    Cache: msg1:2,     # cache of the flags on IMAP at the last sync
    Maildir: msg1:2,a


> What should I do on the next sync? Purely "syncing" the result would be
> (and currently is) overriding the 'a':
> IMAP   : msg1:2,S
> Maildir: msg1:2,S
> Another option would be to ignore all lower case flags and just leave
> them as they are (which would require some flag munching)

I'd go for the latter option if they can't exist on the IMAP side.

How do MUA's treat the 'a' flag of Maildir?  For example, would it make
sense to allow the [Account] stanza to contain a mapping of
lowercase maildir flags <-> IMAP keyword flags?  Then those flags would
be sync'd and other flags (on both sides) ignored.

More information about the OfflineIMAP-project mailing list