<DKIM> [PATCH 2/3] IMAP folder: expose the message keywords

Nicolas Sebrecht nicolas.s-dev at laposte.net
Mon Nov 9 04:09:58 GMT 2015


On Sun, Nov 08, 2015 at 03:50:44PM -0300, Igor Almeida wrote:

> >>  
> >> diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
> >> index 60b5301..7f0fd6d 100644
> >> --- a/offlineimap/folder/IMAP.py
> >> +++ b/offlineimap/folder/IMAP.py
> >> @@ -251,8 +251,10 @@ class IMAPFolder(BaseFolder):
> >>                  uid = long(options['UID'])
> >>                  self.messagelist[uid] = self.msglist_item_initializer(uid)
> >>                  flags = imaputil.flagsimap2maildir(options['FLAGS'])
> >> +                keywords = imaputil.flagsimap2keywords(options['FLAGS'])
> >>                  rtime = imaplibutil.Internaldate2epoch(messagestr)
> >> -                self.messagelist[uid] = {'uid': uid, 'flags': flags, 'time': rtime}
> >> +                self.messagelist[uid] = {'uid': uid, 'flags': flags, 'time': rtime,
> >> +                    'keywords': keywords}
> > 
> > The IMAP server may not accept the provided keywords.
> > 
> Are you talking about an IMAP -> IMAP sync? If so, that could be true
> for the destination server, but this patchset does not implement this
> use case.

Of course. I'm wondering what would happend if... E.g., the user enable
the option in the IMAP repository of the configuration.

> In my use case, IMAP -> Maildir, the flags are already there and we're
> just translating them to lower-case letters.

Oh, didn't you implement Maildir -> IMAP too?

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list