Mailing List Archive

shared mailboxes
Hi all,

I've completed a first implementation of shared mailboxes. It's still
quite simple, on probably quite buggy, although at first sight it
works.

It works in the following way:
There are two extra tables, shared_mailbox and shared_mailbox_access.
The former holds references from 'normal' mailboxes to shared
mailboxes, + some information on the maximum and current sizes of the
shared mailbox. The latter holds a mapping of users to shared
mailboxes. For now, the mappings are very simple (if you can do a
lookup of a mailbox, you're allowed to put emails in it, read them and
delete them).

The other tables are unchanged. The owner_idnr field in the mailboxes
table
is used to indicate shared mailboxes. Whenever the owner_idnr == 0, the
mailbox is shared (this can be done using a join in SQL, I know, but
that would slow things down considerably).

As is to be expected, db.c is changed in quite some places (please
shoot if you find something that needs to be changed but isn't yet).
Because there's quite some added functionality, I've put most of the
shared mailbox code in shared_mailbox.c and shared_mailbox.h.

There are a few drawbacks to the current implementation:
- as mentioned before: permissions need to be worked out. In the
database there are fields read/write/insert/lookup in the
shared_mailbox_access table, but these aren't used yet.
- messages have global flags. If a new message is read, it's status
(Seen_flag) is set to 1, so other users will not see this as a new
message.
- The code is only tested on my machine. Please test & debug it!

The new code is in CVS in the dbmail_2_0 branch (and will be in the
next daily snapshots)

Cheers, & have a nice weekend,
Ilja

--
IC&S
Koningsweg 4
3582 GE UTRECHT

PGP-key:
http://www.ic-s.nl/keys/ilja.txt