annotate TODO @ 376:fd1fc4cf11b7 HEAD

updated with lots of new capability comments
author Timo Sirainen <tss@iki.fi>
date Sun, 06 Oct 2002 19:08:27 +0300
parents 37d52d6a3e7a
children 47d0c169bdba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 test:
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 - make sure mmap()s work properly with NFS
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 - make sure locking is done properly when opening/switching modifylog
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 - make sure SELECT rebuilds index properly when next_uid is near 32bit value
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 - make sure rfc822_parse_date() works properly
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 - make sure imap_match functions work properly
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 - make sure connection limits work
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
8 - make sure the index's ftruncate stuff works
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
9 - make sure modify log works properly, especially switching the files
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 index:
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 - mbox:
96
fb7500933a11 0.97 released
Timo Sirainen <tss@iki.fi>
parents: 61
diff changeset
13 - if a file isn't valid mbox and it's tried to be opened, say it in one
fb7500933a11 0.97 released
Timo Sirainen <tss@iki.fi>
parents: 61
diff changeset
14 line in error log, not 6..
299
696139d3b8f6 updated
Timo Sirainen <tss@iki.fi>
parents: 293
diff changeset
15 - locking: if we set shared lock to it while we're accessing it, we could
696139d3b8f6 updated
Timo Sirainen <tss@iki.fi>
parents: 293
diff changeset
16 get it pretty reliable. this means that the mbox fd needs to be locked
696139d3b8f6 updated
Timo Sirainen <tss@iki.fi>
parents: 293
diff changeset
17 before sync() and kept locked after that until we're done with it.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
18 - requires mbox file to be open all the time. i guess that's fine.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
19 - expunge requires dropping the shared lock and getting exclusive
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
20 lock. after that we must sync again to make sure the file wasn't
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
21 changed.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
22 - could be done in index->set_lock() and try_lock(). in that case
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
23 ignore the above
304
fd304e62e88a 0.98 released.
Timo Sirainen <tss@iki.fi>
parents: 299
diff changeset
24 - empty lines at beginning of file still aren't ignored
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
25 - read-only support for mailboxes where we don't have write-access? Maybe,
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
26 but don't try to use their indexes since that's way too problematic, and
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
27 probably even impossible since we can't lock it.
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
28 - we should try to avoid completely rebuilding indexes unless they're
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
29 corrupted. especially if we later want to support some read-only boxes
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
30 and keep the mail flags only in index file. fsck() could verify that
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
31 records are ok, and that if data file isn't ok the record is deleted.
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
32 - if .customflags is removed and Maildir files have custom flags, add
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
33 "unknown1" "unknown2" etc. flags to .customflags file for each found flag
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
34 - debug: index could be read-only mmaped when it's not locked.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
35 - when index is being rebuilt, it always complains about tree/modifylog
313
df941be7c6b0 released 0.98.1
Timo Sirainen <tss@iki.fi>
parents: 304
diff changeset
36 having wrong indexid..
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
37 - we sometimes leave some space in the index files (memory alignment,
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
38 extra_space). we should keep those bytes zeroed to make sure nothing
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
39 sensitive is left there.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
40 - verify memory alignment is valid when reading from index files. if we
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
41 used "unsigned int record_index"es instead of uoff_t's there wouldn't be
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
42 any problems.. yes, good idea :)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
43 - tree file is never shrinked
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
44 - tree has some locking issues while opening it
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
45
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
46 lib-storage:
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
47 - support multiple mailbox formats and locations for one user. that would
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
48 require support for multiple MailStorages, and since we're chroot()ed,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
49 usually the only way to communicate with others would be to create
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
50 RemoteMailStorage which would use TCP/UNIX sockets to connect to another
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
51 imap session.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
52 - SEARCH:
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
53 - optimize [UN]SEEN, [UN]DELETED and [UN]RECENT. They're able to
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
54 skip lots of messages based on the index header data.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
55 - CHARSET support, iconv()? also means we need to parse the charset stuff
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
56 in headers.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
57 - could optionally support scanning inside file attachments and use
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
58 plugins to extract text out of them (word, excel, pdf, etc. etc.)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
59 - should use imap-msgcache, especially for size checking
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
60 (or should it bother? with larger mailboxes there's no use for it)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
61 - use a trie index for fast text searching, like cyrus squat?
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
62 - DELETE/RENAME: when someone else had the mailbox open, we should
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
63 disconnect it (when stat() fails with ENOENT while syncing)
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
64 - RENAME INBOX isn't atomic with Maildir. And in general, RENAME can't
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
65 move mails between different storages. Maybe support doing also using
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
66 COPY + delete once COPY is atomic?
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
67 - maildir: atomic COPY could be done by having transaction directories.
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
68 Make a "tra" directory at the same level as cur/new/tmp, and make it
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
69 have subdirectories in the same way as tmp has temp files. Directory
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
70 begins with a "." as long as transaction isn't finished, rename()ing
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
71 it away finishes it. All mails under finished dirs must be moved into
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
72 new/ directory and the directory removed by any process who notices them.
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
73 - we should probably do some light checking that appended mails actually
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
74 look like valid rfc822 mails..
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
75 - maybe limit the length of custom flags? we don't really have a problem
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
76 with them, but with mbox a long X-IMAPbase could break something.. Maybe
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
77 configurable, default to 50 chars?
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
78 - we could send flag changes after all commands by making expunge/flags sync
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
79 counters separate for modify log. flags would need to update the seq
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
80 though, too slow?
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
81 - things calling message_send() could verify that it wrote enough data.
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
82 if not, fill the rest with spaces and return failure.
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
83
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
84 general:
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
85 - sieve? (rfc3028)
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
86 - rfc2231 continuation support
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
87
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
88 - go through .temp files and delete them
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
89 - Content-Language isn't parsed correctly
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
90 - ulimit / setrlimit() should be set somewhere for imap process
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
91 - create indexer binary
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
92 - SIGHUPing master should reload the configuration .. killing imap-auth and
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
93 imap-login processes? or just signal imap-login to stop accepting new
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
94 connections and let it kill itself
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
95 - settings for specifying what sort of data to cache by default
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
96 (index->cache_fields)
299
696139d3b8f6 updated
Timo Sirainen <tss@iki.fi>
parents: 293
diff changeset
97 - setting for choosing mbox locking methods
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
98 - imap-login leaks I/O descriptors when killed, that's because the SSL
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
99 fds are destroyed lazily.. should we bother fixing..?
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
100 - logins are always sent now using syslog(), we'd need to have i_info()
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
101 or something so they could also be written to log files.. also make it
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
102 possible to log into different log than errors.
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
103 - should we bother checking if there's invalid 8bit headers in
340
37d52d6a3e7a 0.98.3 out..
Timo Sirainen <tss@iki.fi>
parents: 338
diff changeset
104 BODY/BODYSTRUCTURE output and converting them to quoted printable? well,
37d52d6a3e7a 0.98.3 out..
Timo Sirainen <tss@iki.fi>
parents: 338
diff changeset
105 several of them are now but not all..
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
106 - update docs/index.txt
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
107 - support Maildir++ quota
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
108 - maybe give more untagged NO/ALERT replies? like when mailbox is in
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
109 inconsistent state.
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
110
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
111 auth / login:
337
25f2b396c297 0.98.2 released
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
112 - kchuid, SRP, anonymous SASL
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
113 - PAM: support some options so /etc/passwd-lookup isn't needed. uid=x, gid=y,
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
114 mailroot=/var/mail. maildirs should be then created when needed
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
115 - Digest-MD5: support integrity protection, and maybe crypting. Do it
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
116 through imap-login like SSL is done?
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
117 - imap-auth should limit how fast authentication requests are allowed from
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
118 login processes. especially if there's one login/connection the speed
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
119 should be something like once/sec. also limit how fast to accept new
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
120 connections.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
121 - Diffie Hellman parameters should be regenerated once in a while
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
122 - HIGH: support executing each login in it's own process, so if an exploit
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
123 is ever found from it, the attacker can't see other users' passwords.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
124 - master should limit number of login processes to max_logging_users,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
125 killing old processes when limit is reached
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
126 - master should try to keep login_processes_count extra processes all
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
127 the time
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
128 - login should notify master after it accept()s, and it must close the
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
129 listening socket immediately
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
130 - Diffie Hellman parameters for SSL need to be somehow transferred
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
131 between login processes. It's too slow if they're generated every time,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
132 and I'd rather not link SSL libs to imap-master.
18
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
133
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
134 cleanups / checks:
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
135 - grep for FIXME
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
136 - check if t_push()/t_pop() should be added somewhere
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
137 - IOBuffer should probably be split into IBuffer and OBuffer, and maybe
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
138 making it's internals hidden .. or at least only partly visible.
18
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
139 - allocating readwrite pools now just uses system_pool .. so pool_unref()
6491ac40cdf5 updated
Timo Sirainen <tss@iki.fi>
parents: 13
diff changeset
140 can't free memory used by it .. what to do about it? at least count the
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
141 malloc/free calls and complain if at the exit they don't match
61
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
142 - ..wonder what it would look like if I did s/FooBarBaz/struct foo_bar_baz/..
2ffff61ee5e1 updated
Timo Sirainen <tss@iki.fi>
parents: 29
diff changeset
143 - HIGH: Make sure messages of size INT_MAX..UINT_MAX (and more) work
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
144 correctly with 32bit file offsets. virtual_size can also overflow making
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
145 it less than physical_size.
96
fb7500933a11 0.97 released
Timo Sirainen <tss@iki.fi>
parents: 61
diff changeset
146 - create env_put() and env_clean()
235
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
147 - nearest_power() could be problematic with things that want it for ints,
1fe8eae6fd89 updated
Timo Sirainen <tss@iki.fi>
parents: 96
diff changeset
148 not size_t..
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
149
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
150 optional optimizations:
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
151 - provide some helper binary to save new mail into mailboxes with CR+LF
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
152 line breaks?
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
153 - disk I/O is the biggest problem, so split the mail into multiple computers
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
154 based on user and have a proxy in the front redirecting the connection.
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
155 cyrus had something like this except a lot more complicated - it tried
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
156 to fix the problem of having shared mailboxes. we have the same problem
293
21d53f6b38fc updated
Timo Sirainen <tss@iki.fi>
parents: 235
diff changeset
157 with local shared mailboxes as we don't use same UID for everyone's mail
21d53f6b38fc updated
Timo Sirainen <tss@iki.fi>
parents: 235
diff changeset
158 and we may be chrooted, so locally we could communicate with UNIX sockets,
21d53f6b38fc updated
Timo Sirainen <tss@iki.fi>
parents: 235
diff changeset
159 remotely that could be done with TCP sockets.
376
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
160
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
161 capabilities:
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
162 - preferrably all should be possible to #ifdef away by a configure
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
163 option (--without-capabilities=acl,namespace,...)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
164 - possibility to disable them from config file
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
165 - acl (rfc2086, draft-ietf-imapext-acl), namespace (rfc2342)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
166 - probably do it like cyrus. "user.<username>" to access other
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
167 users, with "" defaulting to "user.<myself>". these should be
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
168 configurable however.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
169 - shared namespaces? maybe configurable in config file
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
170 - easiest way to do ACL would be to use unix modes, but is that
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
171 useful at all? Well, ACL2 has a bit better support for that, so
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
172 maybe we could support it.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
173 - otherwise gets a bit trickly, we could keep all mail in "imapmail"
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
174 group and 0600/0700 mode by default, but when mail is shared to others,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
175 the group read/write access bits would be set. or alternatively we
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
176 could launch another imap process to handle it, which we should support
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
177 anyway. ACLs could be stored into ".acl" ascii file in each folder.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
178 - are flags private or shared between users? lets see if we can
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
179 get ACL2 to configure this.. \Deleted must be shared always,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
180 \Seen should be private by default.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
181 - quota (rfc2087, draft-cridland-imap-quota)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
182 - give filesystem values only to admins
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
183 - support for Maildir++, probably no need to support more.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
184 quota capability supports complex quota configuration, but if
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
185 no mailer supports them we probably shouldn't bother either
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
186 - id (rfc2971)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
187 - must be configurable what gets sent, default to only name=Dovecot
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
188 - separate pre/post-login settings
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
189 - optionally log configured parts of the client information, but only
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
190 once, probably at the same time as logging "Logged in",
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
191 "Disconnected", etc.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
192 - remember to force truncating values longer than 30 chars,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
193 especially before logging
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
194 - mailbox-referrals (rfc2193)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
195 - this is useful whenever we would otherwise need to make the
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
196 connection ourself. for example load balancing and shared mailboxes
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
197 requiring another UID to run.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
198 - this rfc defines no exact way for server to detect if client
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
199 supports referrals or not. I don't think there's much point in
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
200 supporting only referrals, as most clients don't support them.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
201 Instead we should return referrals when we know that client
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
202 supports them, otherwise do the connecting ourself. If client
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
203 issues RLIST or RLSUB command, it's safe to assume it supports
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
204 referrals.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
205 - for load balancing this works just fine, but what about shared
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
206 mailboxes which require different UID? If we login with our own
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
207 username, we end up with our own UID instead of what we wanted.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
208 IMAP URLs don't support separated authorization id which would
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
209 have made this very easy.. We could give the "userid@group" as
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
210 userid, but clients probably treat it as different userid and
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
211 ask the password again.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
212 - problems, problems, .. maybe not worth the trouble.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
213 - literal+ (rfc2088)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
214 - simple. in case of invalid data, just disconnect client.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
215 - idle (rfc2177)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
216 - just call the syncing every few seconds (configurable)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
217 - with Linux we can use fcntl() and F_SETSIG to provide fast checks.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
218 just make sure sync() still won't be called more than once in a
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
219 few seconds
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
220 - uidplus (rfc2359)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
221 - uid expunge: no problem
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
222 - append, copy: oh no. these would slow down things and make
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
223 handling them much more difficult. currently we just store the
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
224 mails to destination mailbox without touching the indexes. since
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
225 we'd need to know their final UID, we'd have to lock the indexes
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
226 and mbox) fsck() first and append() next to find out the uid,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
227 maildir) move the mail directly into cur/ and index it.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
228 - unselect (no draft or anything AFAIK)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
229 - like CLOSE, but doesn't expunge mails. easy.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
230 - drafts:
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
231 - http://www.imc.org/ids.html
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
232 - multiappend (draft-crispin-imap-multiappend)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
233 - shouldn't have any problems
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
234 - listext (draft-ietf-imapext-list-extensions)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
235 - well, it expired January 2002.. I like it though.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
236 - children (draft-gahrns-imap-child-mailbox)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
237 - I like listext more.. They have the same functionality though,
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
238 so pretty easy to support both if needed
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
239 - annotate (draft-ietf-imapext-annotate)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
240 - per-message annotations. this will be major change. especially
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
241 because currently there's no suitable storage for them, and
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
242 they'll probably change all the time.. maybe if we moved into
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
243 berkeley db to store the .data file and these annotations.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
244 - annotatemore (draft-daboo-imap-annotatemore)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
245 - server and per-mailbox annotations. much easier than
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
246 per-message annotations, but they'd be easier to place into
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
247 db as well.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
248 - binary (draft-nerenberg-imap-binary)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
249 - perhaps not too useful. I'd like to make Dovecot fully
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
250 binary-safe though.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
251 - sort (draft-ietf-imapext-sort)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
252 - basically sorted SEARCH, requiring CHARSET support for
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
253 UTF-8 and ASCII
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
254 - we could create alternative binary tree file(s) for different sort
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
255 conditions, ".tree-sort" or something. or if we decide to just
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
256 keep it in memory, btree could still be best choice.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
257 - required by squirrelmail (webmail)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
258 - thread (draft-ietf-imapext-thread)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
259 - basically SORT but reply with thread lists
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
260 - possibly use a binary tree too .. or maybe it's enough to use the
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
261 sort-tree and then just pick up the references separately? have to
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
262 check more carefully later.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
263 - view (draft-ietf-imapext-view)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
264 - slow, complex, luckily draft expired almost two years ago.
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
265 i hope i don't have to implement this :)
fd1fc4cf11b7 updated with lots of new capability comments
Timo Sirainen <tss@iki.fi>
parents: 340
diff changeset
266 - can be done client-side just fine (evolution's virtual folders)