Contains a broken down database representation of the From, To, Cc ReplyTo, and Bcc addresses for each message.
> Columns
mail_id: integer, unique
Unique internal identifier of the message. This is a foreign key
to mail.mail_id.
addr_id: integer, not null
Unique internal identified of a recipient. This is a foreign key
to addresses.addr_id.
addr_type: smallint, not null
A constant integer that identifies the header where the email address
is referenced. The possible values are:
From | 1 |
To | 2 |
Cc | 3 |
ReplyTo | 4 |
Bcc (only for outgoing messages) | 5 |
addr_pos: smallint, not null
The position of the address (starting from 0) in the header when
it contains a list of addresses.
> Example
Consider a message sent from john.doe@company.com to
me@me.com,anotherone@mail.com. We assume that it gets 1234 as a
mail_id, that john.doe@company.com has an id of 1000 (i.e.,
SELECT addr_id FROM addresses WHERE
email_addr='john.doe@company.com'
returns 1000), me@me.com is
10, and anotherone@mail.com is 2000. The mail_addresses
entries related to this message would be:
mail_id | addr_id | addr_type | addr_pos |
---|---|---|---|
1234 | 1000 | 1 | 0 |
1234 | 10 | 2 | 0 |
1234 | 2000 | 2 | 1 |
> Size
Can be expected to contain at least twice the number of rows of mail, and possibly quite more if messages tend to have many different recipients. The growth factor can be expected to be the same as the mail table, however.