syncing flags to/from dovecot servers
Dan Christensen
jdc at uwo.ca
Tue Nov 24 20:21:16 GMT 2009
I've finally figured out why offlineimap isn't syncing the custom IMAP
flags that Gnus marks messages with: it simply doesn't support any
flags except:
flagmap = {'\\seen': 'S',
'\\answered': 'R',
'\\flagged': 'F',
'\\deleted': 'T',
'\\draft': 'D'}
(from imaputil.py). To use offlineimap with Gnus, it's essential that
the gnus-expire mark be synced, as it is used to do a delayed deletion
of messages. It looks to me like this isn't supported by default (even
for IMAP --> IMAP syncs) because the code is designed with a local
maildir in mind.
As a quick fix, I changed the above table to
flagmap = {'\\seen': 'S',
'\\answered': 'R',
'\\flagged': 'F',
'\\deleted': 'T',
'gnus-expire': 'E',
'gnus-dormant': 'Q',
'gnus-forward': 'W',
'gnus-save': 'V',
'\\draft': 'D'}
(and adjusted the reverse table similarly) and now syncing works
for me.
Any chance this change could be accepted? It shouldn't affect non-Gnus
users, but will greatly help Gnus users. I've included the four main
additional marks that Gnus uses, from most to least important. (If
lower case letters are ok, one could also use e, d, f and s for these.)
Alternatively, could offlineimap handle the IMAP --> IMAP case
separately and simply copy the flags as is?
Or, as a third alternative, offlineimap could do what dovecot does,
which is to keep a mapping between custom flags and lower case letters,
and use those letters when storing to the maildir. This last solution
means that *any* custom flags work, both with IMAP --> IMAP and IMAP -->
Maildir. See http://wiki.dovecot.org/MailboxFormat/Maildir
Thanks,
Dan
More information about the OfflineIMAP-project
mailing list