Postby Valerion » Thu May 04, 2006 3:40 am
Well ... this is working from memory only, from docs I read YEARS ago when Scalix was something comepletely different. And Scalix may correct me if I'm wrong :)
When a message enters the system, the responsible queue runner (internet mail gateway, rci, etc) writes it to disk at once, in ~/data somewhere. Scalix writes a container file (containing a list of body parts), and a file for each body part (headers, body and each attachment). The container file has links to these parts. A pointer is then used to route that message through the system.
When it gets handled by local delivery, the service just writes a pointer to the container file into each user's mailbox. This allows for a single copy of the message for multilple recipients.
When it comes to mail folders, the root of your mailbox is in your user dir (omshowu -f will point that out), and each folder under that is a container file in ~/data somewhere, containing other container files.
If you want to trace the structure, you can use tf.browse to some extent, or of course, omcontain (the best tool).
The advantages are IMO:
1) A bad sector on the disk may make you lose an attachment, not a whole mailbox or mailstore, unlike DB-based or mbox-based systems
2) Standard file handling are typically cheap operations, and unlike a mbox you don't have to go sequencially search a large file
3) A 50MB email to 20 users only gets written to disk once, and only takes up that amount of space (plus FS overhead)
Disadvantages:
1) Easy migration to / from other systems (I still think it's easy enough, though)
2) You can't use standard daemons (IMAP, POP3, etc), since only Scalix's daemons will understand the mailstore (But then Scalix HAS all the standard daemons ...)
3) Watch your inode allocation on your filesystem (Been bitten by this once)