1f{,data}sync() usage could be optimized by batching the calls.
2
3make SSL (connect) timeouts produce a bit more than "Unidentified socket error".
4
5automatically resume upon transient errors, e.g. "connection reset by peer"
6or timeout after some data was already transmitted.
7possibly also try to handle Exchange's "glitches" somehow.
8
9add support for IMAP UTF-7 (for internationalized mailbox names).
10
11uidvalidity lock timeout handling would be a good idea.
12
13should complain when multiple Channels match the same folders.
14
15propagate folder deletions even when the folders are non-empty.
16- verify that "most" of the folders in the Channel are still there.
17- refuse to delete unpropagated messages when trashing on the remote side.
18- refuse to delete far side if it has unpropagated messages. symmetry?
19
20add message expiration based on arrival date (message date would be too
21unreliable). MaxAge; probably mutually exclusive to MaxMessages.
22
23add alternative treatments of expired messages. ExpiredMessageMode: Prune
24(delete messages like now), Keep (just don't sync) and Archive (move to
25separate folder - ArchiveSuffix, default .archive).
26
27add support for event notification callbacks.
28it would be also possible to report more differentiated exit codes, but
29that seems too limiting in the general case.
30
31make it possible to have different mailbox names for far and near side in
32Patterns.
33- use far:near for the pattern
34  - for quoting, use more colons: the longest sequence of colons is the
35    separator
36- this makes Groups mostly useless, as they are mostly a workaround for this
37  function being missing so far
38- this is needed for move detection, which would work only within one Channel
39
40add regexp-based mailbox path rewriting to the drivers. user would provide
41expressions for both directions. every transformation would be immediately
42verified with the inverse transform. PathDelimiter and Flatten would become
43special cases of this.
44
45add daemon mode. primary goal: keep imap password in memory.
46also: idling mode.
47
48parallel fetching of multiple mailboxes.
49TLS session resumption becomes interesting then as well.
50
51imap_set_flags(): group commands for efficiency, don't call back until
52imap_commit().
53
54add streaming from fetching to storing.
55
56handle custom flags (keywords).
57
58make use of IMAP CONDSTORE extension (rfc4551; CHANGEDSINCE FETCH Modifier);
59make use of IMAP QRESYNC extension (rfc5162) to avoid SEARCH to find vanished
60messages.
61
62use MULTIAPPEND and FETCH with multiple messages.
63
64dummy messages resulting from MaxSize should contain a dump of the original
65message's MIME structure and its (reasonably sized) text parts.
66
67don't SELECT boxes unless really needed; in particular not for appending,
68and in write-only mode not before changes are made.
69problem: UIDVALIDITY change detection is delayed, significantly complicating
70matters.
71
72some error messages are unhelpful in non-verbose mode due to missing context.
73
74possibly use ^[[1m to highlight error messages.
75
76consider alternative approach to trashing: instead of the current trash-before-
77expunge done by mbsync, let MUAs do the trashing (as modern ones typically do).
78mbsync wouldn't do any trashing by itself, but should track the moves for
79optimization. additionally, there should be a mode to move trashed messages to
80the remote store. TrashMode Internal|External, AbsorbRemoteTrash.
81a yet different approach to trashing is treating the trash like a normal mailbox.
82however, this implies a huge working set.
83
84consider optional use of messages-id (and X-GM-MSGID):
85- detection of message moves between folders
86- recovery from loss of sync state, migration from other tools
87