DOKK / manpages / debian 10 / sympa / sympa_database.5.en
SYMPA_DATABASE(5) sympa 6.2.40 SYMPA_DATABASE(5)

sympa_database - Structure of Sympa core database

Core database of Sympa is based on SQL. In following list of tables and indexes, data types are based on MySQL/MariaDB. Corresponding types are used by other platforms (PostgreSQL, SQLite, ...).

subscriber_table

This table store subscription, subscription option etc.

Fields:

varchar(100)
(Primary key)

email of subscriber

varchar(50)
(Primary key)

list name of a subscription

varchar(80)
(Primary key)

robot (domain) of the list

varchar(20)
reception format option of subscriber (digest, summary, etc.)
int(1)
boolean set to 1 if subscription is suspended
int(11)
the Unix time when message reception is suspended
int(11)
the Unix time when message reception should be restored
varchar(35)
FIXME
smallint(6)
FIXME
varchar(100)
FIXME
int(11) not null
date of subscription
int(11)
the last time when subscription is confirmed by subscriber
varchar(150)
free form name
int(5) not null
the number of message the subscriber sent
varchar(20)
FIXME
varchar(200)
topic subscription specification
int(1)
boolean set to 1 if subscriber comes from ADD or SUB
int(1)
boolean, set to 1 is subscriber comes from an external datasource. Note that included_subscriber and subscribed_subscriber can both value 1
varchar(50)
comma separated list of datasource that contain this subscriber
FIXME

Indexes:

user_subscriber

user_table

The user_table is mainly used to manage login from web interface. A subscriber may not appear in the user_table if they never log through the web interface.

Fields:

varchar(100)
(Primary key)

email of user

varchar(64)
password are stored as finger print
varchar(150)
display name of user
int(11)
Unix time of last login, printed in login result for security purpose
varchar(60)
host of last login, printed in login result for security purpose
int(11)
login attempt count, used to prevent brute force attack
int(11)
the last Unix time when this user was confirmed their activity by purge_user_table task
FIXME
varchar(10)
user language preference
FIXME
FIXME

inclusion_table

Inclusion table is used in order to manage lists included from / including subscribers of other lists.

Fields:

varchar(131)
(Primary key)

list ID of including list

(Primary key)

role of included user

varchar(131)
(Primary key)

list ID of included list

int(11)
the date this entry was created or updated

exclusion_table

Exclusion table is used in order to manage unsubscription for subscriber included from an external data source.

Fields:

varchar(57)
(Primary key)

FIXME

varchar(80)
(Primary key)

FIXME

varchar(100)
(Primary key)

FIXME

varchar(50)
(Primary key)

FIXME

int(11)
FIXME

session_table

Management of HTTP session.

Fields:

varchar(30)
(Primary key)

the identifier of the database record

varchar(30)
previous identifier of the database record
int(11) not null
the date when the session was created
int(11) not null
Unix time of the last use of this session. It is used in order to expire old sessions
int(11)
Unix time of the last refresh of this session. It is used in order to refresh available sessions
varchar(60)
the IP address of the computer from which the session was created
varchar(80)
the virtual host in which the session was created
varchar(100)
the email associated to this session
int(11)
the number of hit performed during this session. Used to detect crawlers
parameters attached to this session that don't have a dedicated column in the database

Indexes:

prev_id_session

one_time_ticket_table

One time ticket are random value used for authentication challenge. A ticket is associated with a context which look like a session.

Fields:

varchar(30)
(Primary key)

FIXME

varchar(100)
FIXME
varchar(80)
FIXME
int(11)
FIXME
varchar(200)
FIXME
varchar(60)
FIXME
varchar(60)
FIXME

notification_table

Used for message tracking feature. If the list is configured for tracking, outgoing messages include a delivery status notification request and optionally a message disposition notification request. When DSN and MDN are received by Sympa, they are stored in this table in relation with the related list and message ID.

Fields:

bigint(20) auto_increment
(Primary key)

autoincrement key

varchar(100)
initial message-id. This field is used to search DSN and MDN related to a particular message
varchar(100)
email address of recipient for which a DSN or MDN was received
varchar(20)
the subscription option of the subscriber when the related message was sent to the list. Useful because some recipient may have option such as //digest// or //nomail//
varchar(100)
value of notification
varchar(80)
reception date of latest DSN or MDN
int(11)
reception date of latest DSN or MDN
type of the notification (DSN or MDN)
varchar(50)
the listname the message was issued for
varchar(80)
the robot the message is related to
int(11) not null
FIXME

logs_table

Each important event is stored in this table. List owners and listmaster can search entries in this table using web interface.

Fields:

varchar(100)
e-mail address of the message sender or email of identified web interface user (or soap user)
int(11) not null
date when the action was executed
int(6)
subsecond in microsecond when the action was executed
varchar(80)
name of the robot in which context the action was executed
varchar(50)
name of the mailing-list in which context the action was executed
varchar(50) not null
name of the Sympa subroutine which initiated the log
varchar(100)
comma-separated list of parameters. The amount and type of parameters can differ from an action to another
varchar(100)
e-mail address (if any) targeted by the message
varchar(255)
identifier of the message which triggered the action
varchar(10) not null
exit status of the action. If it was an error, it is likely that the error_type_logs field will contain a description of this error
varchar(150)
name of the error string - if any - issued by the subroutine
varchar(100)
IP address of the client machine from which the message was sent
varchar(10) not null
name of the Sympa daemon which ran the action

stat_table

Statistics item are stored in this table, Sum average and so on are stored in stat_counter_table.

Fields:

int(11) not null
FIXME
varchar(100)
FIXME
varchar(50) not null
FIXME
varchar(50)
FIXME
varchar(20)
FIXME
varchar(100)
FIXME
varchar(80) not null
FIXME
varchar(50)
FIXME
tinyint(1) not null
FIXME

Indexes:

email_stat

stat_counter_table

Used in conjunction with stat_table for users statistics.

Fields:

int(11)
FIXME
int(11) not null
FIXME
varchar(50) not null
FIXME
varchar(80) not null
FIXME
varchar(50)
FIXME
FIXME

admin_table

This table is an internal cash where list admin roles are stored. It is just a cash and it does not need to be saved. You may remove its content if needed. It will just make next Sympa startup slower.

Fields:

varchar(100)
(Primary key)

list admin email

varchar(50)
(Primary key)

list name

varchar(80)
(Primary key)

list domain

(Primary key)

a role of this user for this list (editor, owner or listmaster which a kind of list owner too)

privilege level for this owner, value //normal// or //privileged//. The related privilege are listed in edit_list.conf.
int(11) not null
date this user become a list admin
int(11)
last update time
varchar(20)
email reception option for list management messages
varchar(20)
admin user email can be hidden in the list web page description
varchar(150)
FIXME
int(1)
set to 1 if user is list admin by definition in list config file
int(1)
set to 1 if user is admin by an external data source. Note that included_admin and subscribed_admin can both value 1
varchar(50)
name of external datasource
varchar(150)
private information usually dedicated to listmasters who needs some additional information about list owners

Indexes:

user_admin

netidmap_table

FIXME

Fields:

varchar(100)
(Primary key)

FIXME

varchar(100)
(Primary key)

FIXME

varchar(80)
(Primary key)

FIXME

varchar(100)
FIXME

conf_table

FIXME

Fields:

varchar(80)
(Primary key)

FIXME

varchar(80)
(Primary key)

FIXME

varchar(300)
the value of parameter //label_conf// of robot //robot_conf//.

list_table

The list_table holds cached list config and some items to help searching lists.

Fields:

varchar(50)
(Primary key)

name of the list

varchar(80)
(Primary key)

name of the robot (domain) the list belongs to

varchar(50)
name of the family the list belongs to
status of the list
varchar(100)
email of user who created the list
int(11)
UNIX time when the list was created
varchar(100)
email of user who updated the list
int(11)
UNIX time when the list was updated
varchar(255)
case-folded list subject to help searching
tinyint(1)
if the list has archives
varchar(255)
topics of the list, separated and enclosed by commas
int(7)
estimated number of subscribers

Sympa Administration Manual. <https://sympa-community.github.io/manual/>.

2020-12-10 6.2.40