dbclean(8)
π dbclean(8) β Clean Distributed Checksum Clearinghouse Database π
okay bestie, welcome to the System Manager's Manual page for dbclean(8) β yes, the one and only DCC database cleaner. Pull up a chair, hydrate, and let's get into it π
β¨ NAME β¨
dbclean β Clean Distributed Checksum Clearinghouse Database
π¦ SYNOPSIS π¦
dbclean [-dfFNPSVqu] [-i id] [-a [server-addr][,port]] [-h homedir]
[-H hash-file-dir] [-D db-file-dir] [-G on] [-R mode]
[-s hash-size] [-e seconds] [-E spamsecs]
[-L ltype,facility.level]
πΈ DESCRIPTION πΈ
okay so dbclean is the main character here: it creates empty databases, rebuilds corrupted ones, and deletes or expires old reports of checksums from DCC databases. iconic behavior, honestly π«Ά
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, /usr/libexec/cron-dccd.
The whitelist in /var/dcc/whitelist or /var/dcc/grey_whitelist is built into the DCC server's database. Changes to the whitelist are not effective until dbclean is run. White or blacklists can also be used by DCC clients and work better.
π OPTIONS π
The following options are available. Most of them should be set by changing DBCLEAN_LOGDAYS and DBCLEAN_ARGS in the /var/dcc/dcc_conf control file.
-dβ enables debugging output. Additional-doptions increase the number of messages.-Fβ useswrite()instead ofmmap()andmsync()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-Fwith-f,-H, or-D.-fβ usesmmap()andmsync()to modify the DCC database. Do not use-fwith-F,-H, or-D.-Nβ creates a new, empty database. There must not be an existing database and the DCC server,dccd(8), must not be running.-Pβ expires old checksums from a database using the-e -and -Evalues from the preceding use ofdbclean.-Pcannot be used with-eor-E. Using-Pdiffers from not using-eor-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 sodbcleanshould run stand-alone and not try to tell the DCC server about changes to the database.-iis not needed with-S.-Vβ displays the version of the DCC database cleaner. Two or more-Voptions show the options with which it was built.-qβ quiets the announcement tostderrof the final results and debugging messages turned on with-d. Results are still sent to the system log.-uβ should be used when the file system containing thedcc_dbanddcc_db.hashfiles is "ultra-fast," such as a solid-state drive. This setting postpones writing some data during normal operation until the system is shutdown. This reduces wear on the SSD at the cost of writing GBytes of data when the system is shutdown. Writing GBytes to a rotating disk at system shutdown is unacceptable, but not noticeable to a non-rotating disk that operates 10 or 100 times faster.-i idβ specifies the DCC ID recognized by the local DCC server as its own. This ID allows the DCC server to recognize commands fromdbcleanto stop using the database while it is being cleaned.-a [server-addr][,port]β is commonly used to specify a UDP port or IP address of the local server other than the default.-h homedirβ overrides the default DCC home directory,/var/dcc.-H hash-file-dirβ puts thedcc_db.hashhash table file in thehash-file-dirdirectory with a symbolic link. Using-Hto put the hash table in a memory, "tmpfs", or "swap" file system such as/dev/shmor/tmpsignificantly speeds up the DCC server,dccd(8), on operating systems such as Linux and Solaris that lack theMAP_NOSYNCflag for themmap(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 except when -D is used. The DCC database file, dcc_db, should usually be in a file system that is not cleared by 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 /usr/libexec/cron-dccd cron job.
Do not use -H with -F or -f.
-D db-file-dirβ puts the/var/dcc/dcc_dbdatabase and the/var/dcc/dcc_db.hashhash table files in thedb-file-dirdirectory with symbolic links. Using-Dto put the files in a memory, "tmpfs", or "swap" file system such as/dev/shmor/tmpsignificantly speeds up the DCC server,dccd(8), but causes several GBytes of database transfers before DCC is effective whenever the operating system is restarted.-Dshould not be used except at sites with more than one DCC server installation and where at least one of the other local servers is not using-D.-Dshould only be used on systems that are rarely rebooted, because up to one month is required for the database to reach equilibrium.
The memory file system must have space for two copies of the dcc_db file.
Use or stop using -D 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 /usr/libexec/cron-dccd cron job.
Do not use -D with -F or -f.
-G onβ cleans a greylist database in/var/dcc/grey_dband/var/dcc/grey_db.hashinstead of a DCC server database.-R modeβ repairs a database or does a quick cleaning. Mode must be one of the following: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 rebooted.failsafeβ to work around missing nightly cleaning by thecron(8)job,/usr/libexec/cron-dccd.delβ to finish processing a delete command received bydccd(8).
-s hash-sizeβ 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 file.-e secondsβ 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 database. The default value is1DAYor 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 beNEVERor a number of hours, days, or weeks followed byHOURS,H,DAYS,D,WEEKSorW.
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.
-E spamsecsβ changes the expiration of checksums with more than 10 targets from the default of30DAYSor 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 beNEVERor a number of hours, days, or weeks followed byHOURS,H,DAYS,D,WEEKSorW.-L ltype,facility.levelβ specifies how messages should be logged. Ltype must beerror,info, oroffto indicate which of the two types of messages are being controlled or to turn off allsyslog(3)messages fromdbclean. Level must be asyslog(3)level amongEMERG,ALERT,CRIT,ERR,WARNING,NOTICE,INFO, andDEBUG. Facility must be amongAUTH,AUTHPRIV,CRON,DAEMON,FTP,KERN,LPR,MAIL,NEWS,USER,UUCP, andLOCAL0throughLOCAL7. The default is equivalent to-L info,MAIL.NOTICE -L error,MAIL.ERR.
dbclean exits 0 on success, and > 0 if an error occurs.
π FILES π
/var/dccβ is the DCC home directory containing data and control files.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.dcc_db-old, grey_db-oldβ previous database files.idsβ list of IDs and passwords, as described indccd(8).whitelistβ contains the DCC server whitelist in the format described indcc(8).grey_whitelistβ contains the greylist server whitelist.
π SEE ALSO π
okay bestie, go read these too:
β HISTORY β
Implementation of dbclean was started at Rhyolite Software, in 2000. This document describes version RHYOLITE_VERSION.
π
that's the whole page, bestie β source/version: RHYOLITE_VERSION (Rhyolite Software), date: March 22, 2024, and yes it's the System Manager's Manual. mwah π
π¦ where this page comes from
- alpine 3.24: dcc-doc 2.3.169-r3 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms