6.8 Database Configuration

Syntax

 
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 a DBM database identified by dbname. Allowed values for the latter are: ‘cache’, ‘dns’, ‘rate’ and ‘greylist’ for main cache, DNS lookup, sending rate and greylisting databases, correspondingly.

Statements

database: file name

Set the database file name.

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.

Notice, that for ‘dns’ database this statement is equivalent to negative-expire-interval (see below): the DNS lookup cache uses DNS TTL as expiration interval for records representing positive lookups. See DNS Cache Management, for more information of DNS cache database and its management.

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’ and ‘dns’ databases.

For ‘cache’ database, it sets expiration interval for negative (‘not_found’) cache entries.

For ‘dns’ database, it sets expiration interval for negative DNS cache entries.

Additional Statements

The following statements are used to tune database file locking:

Mailfromd Conf: lock-retry-count number

Set maximum number of attempts to acquire the lock. The time between each two successive attempts is given by lock-retry-timeout statement (see below). After the number of failed attempts, mailfromd gives up.

Mailfromd Conf: lock-retry-timeout time

Set the time span between the two locking attempts. Any valid time interval specification (see time interval specification) is allowed as argument.

Mailfromd Conf: expire-interval time

Sets expiration interval for all databases.