G. Pape
qconfirm

qconfirm - cdb


How it works
How to configure qconfirm to use a constant database
qconfirm uses the file-system, more precisely the qconfirm directory, as database to keep track of known, pending, and bad envelope sender ids and temporarily deferred messages.

If you run qconfirm for a public mail address that receives a lot of mail from a lot of different senders (such as large mailing list) in message mode, there could be a great many of files in the ok/ directory. Normally a file-system can handle a few thousands of files in a directory without performance problems. You can check the number of files in your ok/ directory by running ls -1 ~/.qconfirm/ok |wc -l.

If you run a lot of such mail addresses with qconfirm in message mode, the qconfirm directories could use a large number of inodes. You can check the inode usage of a file-systems by running df -i <device>.

If you encounter performance problems due to large directories, or if a file-system holding qconfirm directories runs out of inodes, you should configure some mail addresses to use a constant database for known envelope sender ids. This should only happen on systems running a lot of mail addresses with qconfirm in message mode under a high mail load.

How it works

qconfirm-check still operates on its qconfirm directory. Unknown envelope sender mail addresses are additionally checked against a constant database before a delivery confirmation request is sent; the message will delivered without confirmation if the test was successful. Whenever a minimal number of new envelope sender mail addresses have confirmed delivery and so are known, they are transferred to the constant database, and deleted from the qconfirm directory: The qconfirm-cdb-update maintains the constant database by adding a bunch of new known envelope sender address ids from the qconfirm directory to the database and removing old and obsolete ones from it.

How to configure qconfirm to use a constant database

Tell qconfirm-check to use the qconfirm-cdb-check program to match the envelope sender address against the constant database ~/.qconfirm/ok.cdb. To do so, edit the corresponding .qmail file and add qconfirm-cdb-check as prog argument to qconfirm-check like this:
  |qconfirm-check -d./.qconfirm qconfirm-cdb-check
Tell qconfirm-check to set up qconfirm-cdb-update as prog argument to qconfirm-accept when creating temporary ~/.qmail-qconfirm-<key> files:
  $ echo 'qconfirm-cdb-update' >~/.qconfirm/conf/QCONFIRM_ACCEPT_PROG
Finally switch to your home directory and manually run qconfirm-cdb-update once to create the constant database ~/.qconfirm/ok.cdb and transfer ids from ~/.qconfirm/ok/:
  $ cd ~
  $ qconfirm-cdb-update -m0
qconfirm-cdb-update will be run automatically whenever an envelope sender confirms a delivery.
Gerrit Pape <pape@smarden.org>
$Id: cdb.html,v 1.3 2003/11/27 14:10:27 pape Exp $