D.2 #pragma database

This appendix describes an obsolete way of configuring mailfromd databases. For a new way, see Database Configuration.

The #pragma database statement is used to control file names and expiration periods used for various DBM databases. Its syntax is:

#pragma database dbname file filename

Set the database file name for the database dbname. See section file.

#pragma database dbname expire-interval interval

Set the expiration interval for the database dbname. (See time interval specification, for more information on interval syntax).

See section expire-interval.

The parameter dbname can be one of the following: ‘cache’, ‘dns’, ‘rate’ and ‘greylist’ for main cache, DNS lookup, sending rate and greylisting databases, correspondingly.

The first two databases merit special attention. The cache database implements two different timeouts, therefore there are two special forms of this statement for ‘cache’ database:

#pragma database cache positive-expire-interval interval

Set expiration interval for positive (‘success’) cache entries. Use positive-expire-interval, instead.

#pragma database cache negative-expire-interval interval

Set expiration interval for negative (‘not_found’) cache entries.

Use negative-expire-interval, instead.

The DNS lookup cache uses DNS TTL as expiration interval for records representing positive lookups. The only value that can be altered is negative expiration interval:

#pragma database dns negative-expire-interval interval

Set expiration interval for negative DNS cache entries. Use negative-expire-interval, instead.