Next: , Previous: , Up: Mailfromd Configuration   [Contents][Index]

7.11 Database Configuration


database dbname {
  file name;
  enable bool;
  expire-interval interval;
  positive-expire-interval interval;
  negative-expire-interval interval;
Mailfromd Conf: database dbname

The database statement controls run-time parameters of the DBM database identified by dbname. Allowed values for the latter are:


Callout cache database.


Sending rate database. See Sending Rate.


Token-bucket filter database. See TBF.


Greylisting database. See Greylisting.


database: file name

Set the database file name. The file name can be prefixed with the DBM scheme, which indicates the desired DBM implementation to use. The scheme consists of DBM type name followed by a colon and two slashes. To obtain the list of available DBM types, run mailfromd --show-defaults (see Examining Defaults) and examine the ‘supported database types:’ line, e.g.:

$ mailfromd --show-defaults | grep '^supported database types:'
supported database types:gdbm, bdb

If no DBM scheme is supplied, the default DBM implementation will be used. The default implementation is set up on compile time and can be inspected using the following command:

mailfromd --show-defaults | grep '^default database type:'

The part that follows DBM scheme can be either absolute or relative file name. Absolute file name (begining with ‘/’) is used verbatim. Relative file name (i.e. the name that begins with any character except ‘/’) is modified by prepending it with the mailfromd local state directory (see statedir).

To illustrate the above, suppose that the local state directory is /var/mailfromd and default DBM implementation is gdbm. Then:

Value of fileResulting filenameDBM type
bdb://tbf.db/var/mailfromd/tbf.dbBerkeley DB
bdb:///run/tbf.db/run/tbf.dbBerkeley DB
database: enable bool

Enable or disable this database.

database: expire-interval time

Set the expiration interval for this database dbname. See time interval specification, for a description of time format.

database: positive-expire-interval time

This statement is valid only for ‘cache’ database. It sets the expiration interval for positive (‘success’) cache entries.

database: negative-expire-interval time

This statement is valid only for ‘cache’ database, where it sets expiration interval for negative (‘not_found’) cache entries.

Additional Statements

Mailfromd Conf: database-type type

Set default database type. type is one of the database types supported by mailutils (i.e., for Mailutils 3.0: ‘gdbm’, ‘ndbm’, ‘bdb’, ‘kc’, and ‘tc’). Run

mailfromd --show-defaults | grep 'supported databases:'

to get a list of type names supported by your build of mailfromd (see Examining Defaults).

Mailfromd Conf: database-mode mode

Defines file mode for newly created database files. mode must be a valid file mode in octal.

Next: , Previous: , Up: Mailfromd Configuration   [Contents][Index]