The messages table

This table contains one row for each distinct message stored.

If a message exists in more than one mailbox, there will be more than one row in mailbox_messages rows, all of which refer to just one row in messages.

id stores the message's database id. It is used to refer to this message from the many tables that hold the message contents, such as address_fields, header_fields and (via part_numbers) bodyparts.

The idate is the time the message was added to the mailbox, as a unix time_t (seconds since the start of 1970). Archiveopteryx sets it correctly when a message is added via SMTP or LMTP, but IMAP clients can also add messages, and specify any idate they want.

rfc822size is an optimisation. It is the size of the message in RFC 822 format, in bytes. It could be computed when needed, but IMAP clients ask for it often and computing it is slow.

create table messages ( -- Grant: select, insert id serial primary key, idate integer not null, rfc822size integer );

The messages table was introduced in version 0.93.

In case of questions, please write to info@aox.org.

Relevant links

About this page

Last modified: 2010-11-19
Location: aox.org/db/messages