The header_fields table

header_fields contains the values of most header fields in most messages, except address fields.

We'll use this example to explain the other fields:

From: nirmala@example.org Subject: Historische Ölmühle Eberstedt To: info@aox.org Date: 1 Apr 2007 12:13:13 +0200

In this header, the From and To fields are stored in address_fields and the Date and Subject fields in header_fields. (There is also a copy of Date in date_fields — this duplication enhances performance.)

The part column records to which MIME part this header field belongs. It's empty for the main header (the one seen above) and nonempty when a multipart message has headers on each part.

The position column is used to sort the entire message header. Subject has position 2 and Date 4.

The field column refers to field_names. There is a field_names row for Subject and one for Date.

The value column contains the UTF-8 value of the header field. It is Historische Ölmühle Eberstedt in the example above, ie. not encoded using RFC 2047 or other encoding.

create table header_fields ( -- Grant: select, insert id serial primary key, message integer not null, part text not null, position integer not null, field integer not null references field_names(id), value text, unique (message, part, position, field), foreign key (message, part) references part_numbers(message, part) on delete cascade );

The header_fields 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/header_fields