dbclean(8) Distributed Checksum Clearinghouse dbclean(8)
dbclean -- Clean Distributed Checksum Clearinghouse Database
dbclean [-dfFNPSVq] [-i id] [-a [server-addr][,port]] [-h homedir]
[-H hash-file-dir] [-G on] [-R mode] [-s hash-size]
[-e seconds] [-E spamsecs] [-L ltype,facility.level]
Dbclean creates empty, rebuilds corrupted, and deletes or expires old
reports of checksums from DCC databases. It should be installed where it
will be found with the path given the DCC server daemon when the daemon
needs to expand the hash table. See dccd(8). It should also be run by
the daily cron(8) job, /var/dcc/libexec/cron-dccd.
The whitelist in /var/dcc/whitelist or /var/dcc/grey_whitelist are built
into the DCC server's database. Changes to the whitelist are not effec-
tive until dbclean is run. White or blacklists can also be used by DCC
clients and work better.
The following options are available. Most of them should set by changing
DBCLEAN_LOGDAYS and DBCLEAN_ARGS in the /var/dcc/dcc_conf control file.
-d enables debugging output. Additional -d options increase the number
-F uses write() instead of mmap() and msync() in some cases to modify
the DCC database. This works better on some versions of Solaris
provided the entire DCC database fits in RAM and provided the file
system has not been tuned for the large, random accesses of a DCC
database. It is the default on Solaris except when the database is
in a memory mapped file system or the entire database fits in RAM.
Do not use -F with -f or -H.
-f uses mmap() and msync() to modify the DCC database. Do not use -f
with -F or -H.
-N creates a new, empty database. There must not be an existing data-
base and the DCC server, dccd(8), must not be running.
-P expires old checksums from a database using the -e -and -E values
from the preceding use of dbclean. -P cannot be used with -e or -E.
Using -P differs from not using -e or -E, because in the absence of
all three, their default values are used.
-S says that the DCC server, dccd(8), is not running and so dbclean
should run stand-alone and not try to tell the DCC server about
changes to the database. -i is not needed when -S is present.
-V displays the version of the DCC database cleaner. Two or more -V
options show the options with which it was built.
-q quiets the announcement to stderr of the final results and debugging
messages turned on with -d. Results are still sent to the system
specifies the DCC ID recognized by the local DCC server as its own.
This ID allows the DCC server to recognize commands from dbclean to
stop using the database while it is being cleaned.
is commonly used to specify a UDP port or IP address of the local
server other than the default.
overrides the default DCC home directory, /var/dcc.
puts the /var/dcc/dcc_db.hash hash table file in the hash-file-dir
directory with a symbolic link. Using -H to put the hash table in a
memory, "tmpfs", or "swap" file system such as /dev/shm or /tmp sig-
nificantly speeds up the DCC server, dccd(8), on operating systems
such as Linux and Solaris that lack the MAP_NOSYNC flag for the
mmap(8) system call.
The memory file system must have space for two copies of the
dcc_db.hash file. -H is undesirable on FreeBSD and other systems
with MAP_NOSYNC. The DCC database file, /var/dcc/dcc_db, must be in
file system that endures operating system rebooting and not in a
memory file system.
Use or stop using -H by adding it to or removing it from
DBCLEAN_ARGS in /var/dcc/dcc_conf and manually running or waiting
for the nightly run of the /var/dcc/libexec/cron-dccd cron job. Do
not use -H with -F or -f.
cleans a greylist database in /var/dcc/grey_db and
/var/dcc/grey_db.hash instead of of a DCC server database.
repairs a database or does a quick cleaning. Mode must be one of
bad to repair a broken database.
quick for a quick, superficial cleaning during the day.
hash to rebuild a hash not sent to disk before the system was
to work around missing nightly cleaning by the cron(8) job,
del to finish processing a delete command received by dccd(8).
specifies a size for the hash table in /var/dcc/dcc_db.hash. By
default the hash table is rebuilt to be approximately 80% full based
on an estimate of the number of distinct checksums in the database
specifies that reports older than seconds and with totals below 10
targets should be deleted. Reports older than seconds of checksums
that have been reported more recently are summarized in the data-
base. The default value is 1DAY or the value of -E, whichever is
smaller. The 1 day default is reduced if the system does not appear
to have enough RAM to hold the database. The minimum is 1 hour.
Seconds can also be NEVER or a number of hours, days, or weeks fol-
lowed by HOURS, H, DAYS, D, WEEKS or W.
DCC servers that are not very busy and are isolated or do not
receive "floods" of checksums from busy servers should use longer
values to increase their chances of recognizing bulk mail.
changes the expiration of checksums with more than 10 targets from
the default of 30DAYS or the explicit value of -e, whichever is
larger. The default is reduced if the system does not have enough
RAM to hold the database. Spamsecs can also be NEVER or a number of
hours, days, or weeks followed by HOURS, H, DAYS, D, WEEKS or W.
specifies how messages should be logged. Ltype must be error, info,
or off to indicate which of the two types of messages are being con-
trolled or to turn off all syslog(3) messages from dbclean. Level
must be a syslog(3) level among EMERG, ALERT, CRIT, ERR, WARNING,
NOTICE, INFO, and DEBUG. Facility must be among AUTH, AUTHPRIV,
CRON, DAEMON, FTP, KERN, LPR, MAIL, NEWS, USER, UUCP, and LOCAL0
through LOCAL7. The default is equivalent to
-L info,MAIL.NOTICE -L error,MAIL.ERR
dbclean exits 0 on success, and > 0 if an error occurs.
/var/dcc is the DCC home directory containing data and control
dcc_conf is the DCC control file.
dcc_db is the main file containing mail checksums.
dcc_db.hash mail checksum database hash table.
grey_db is the database of greylist checksums.
grey_db.hash is the greylist database hash table.
dcc_db-new, dcc_db-new.hash, grey_db-new, grey_db-new.hash
new database and hash files until they are renamed.
previous database files.
ids list of IDs and passwords, as described in dccd(8).
whitelist contains the DCC server whitelist in the format described
contains the greylist server whitelist.
cdcc(8), cron(8), dcc(8), dccd(8), dblist(8), dccifd(8), dccm(8),
Implementation of dbclean was started at Rhyolite Software, in 2000.
This document describes version 1.3.145.
May 16, 2013
Man(1) output converted with
modified for the DCC $Date 2001/04/29 03:22:18 $