The connections table

connections is a log table for most IMAP and POP connections. It doesn't contain absolutely all connections — if a connection is aborted before authentication, the server crashes, or the security configuration variable is disabled, then that connection isn't logged.

This table is never used by Archiveopteryx itself, but can be useful for analysing server usage.

userid links to the user who authenticated.

address is client's IP or IPv6 address and port is client's TCP port.

mechanism names the SASL mechanism used to authenticate, such as cram-md5 or plain.

authfailures contains the number of failed authentication attempts before the one that succeeded. This is not exact, since authentication failures come in many sizes and shapes, and it's not always clear what should be counted.

syntaxerrors contains the number of syntax errors sent by the client. It's always 0 except when a buggy mail client is used. (It can be difficult to classify some errors. We've chosen to count too few rather than too many errors here.)

started_at and ended_at are the times when the connection was opened and closed.

create table connections ( -- Grant: insert id serial primary key, userid integer references users(id), address inet not null, port integer not null, mechanism varchar not null, authfailures integer not null, syntaxerrors integer not null, started_at timestamp with time zone not null, ended_at timestamp with time zone not null );

The users table was introduced in version 2.10.

In case of questions, please write to

Relevant links

About this page

Last modified: 2010-11-19