Here's where you can find all the detail on how Archiveopteryx stores its mail — what's in each table, what each row is, what each column is. In other words, this is not the simple introduction.
The main tables are mailboxes, mailbox_messages and messages. Messages holds messages, mailboxes holds mailboxes and mailbox_messages records which messages are in which mailboxes. (If a message in in two mailboxes, there will be two mailbox_messages rows but only one messages row.)
The messages table doesn't actually contain all the mail. Instead it has a variety of helper tables: address_fields for From, To and friends, header_fields for Subject etc., date_fields for Date, bodyparts for message bodies and the helper table part_numbers to tie messages to bodyparts.
The addresses table deserves mention. It's used to hold every email address in the system, and is used all the time.
Three tables are used to hold user-specified information about messages and mailboxes: flags record whether a message is read or unread, etc., annotations is practically unused (see IMAP ANNOTATE for more) and subscriptions records which mailboxes each user is particularly interested in (used by some people, not all).
Finally there are some semi-internal tables. The list below includes everything.
In case of questions, please write to firstname.lastname@example.org.
Last modified: 2010-11-19