3.15 Databases

Some mailfromd functions use DBM databases to save their persistent state data. Each database has a unique identifier, and is assigned several pieces of information for its maintenance: the database file name and the expiration period, i.e. the time after which a record is considered expired.

To obtain the list of available databases along with their preconfigured settings, run mailfromd --show-defaults. You will see an output similar to this:

 
version:             6.0
script file:         /etc/mailfromd.mf
user:                mail
statedir:            /var/run/mailfromd
socket:              unix:/var/run/mailfromd/mailfrom
pidfile:             /var/run/mailfromd/mailfromd.pid
default syslog:      blocking
database format:     Berkeley DB 2.x
dns database:        /var/run/mailfromd/dns.db
dns negative expiration: 3600
cache database:      /var/run/mailfromd/mailfromd.db
cache expiration:    86400
cache negative expiration: 43200
greylist database:      /var/run/mailfromd/greylist.db
greylist expiration:    86400
rate database:      /var/run/mailfromd/rates.db
rate expiration:    86400

The text below ‘database format’ line describes all available databases. Notice that the ‘cache’ database, in contrast to the rest of databases, has two expiration periods associated with it. This is explained in the next subsection.