A table automatically managed by triggers, that contains references to mail messages which are not yet archived (incoming), or not yet sent (outgoing). This table is supposed to be always relatively small and cached by the database server, so this allows to speed up queries that deal with the small subset of messages that is actually current. That is especially true for databases containing very large sets of messages.
Structure of mail_status
Unique internal identifier of the message.
The same as
mail.status, except that only the values that have their bits 8 (Sent) and 5 (Archived) cleared will be found here.
Note: This table exists only for performance reasons and it's use is not encouraged except in the core of Manitou's application code. If possible, use the status field of the mail table instead.
If parts or all of the contents of mail_status get accidentally deleted, they can be regenerated using the following SQL query:
INSERT INTO mail_status(mail_id,status)
SELECT mail_id,status FROM mail
WHERE status&32=0 AND status&256=0
AND mail_id NOT IN (SELECT mail_id FROM mail_status)