Configuration in the Database

Author: Ilja Booij


This issue is closely linked to the Configuration Daemon issue. We would like to be able to tune as many DBMail parameters as possible using database entries. To do this, there still needs to be a configuration file with some minimal information:

* database host, databasename, username, password

* user to run as.

Optionally, these arguments could be passed as command line arguments, so no configuration file would be needed or used.

The DBMail program (e.g. dbmail-pop3d, dbmail-smtp) would then make the database connection and find all necessary configuration options in the database.

Design issues

Because there might be several daemons running on the different boxes, any configuration record should also hold the hostname/IPnumber for the record. Configuration records could perhaps look like this:

host service key value
imap1 imap maxchildren 50
imap2 imap maxchildren 100
imap2 pop3 maxchildren 200


The host key could also be replaced by a token representing a host, or simply a config set. e.g. “ispa” vs “ispb”, which would avoid needless duplication of similar host configs, and allow daemons on a particular server to choose different configurations easily.

Local command-line options should also override the database settings, to allow tempoary values to be applied without change the config for an entire cluster (e.g. increase debug level).


It makes sense to make the configuration available on a different database then the mail storage. db01 might be used for user and configuration information, while db02…dbxx will hold the mail storage. User and configuration information can be considered global information, while mail storage can be distributed over several databases.

configdb.txt · Last modified: 2012/02/27 21:40 by bas
DBMail is developed by Paul J Stevens together with developers world-wide