.\" Copyright (c) 2006 by Rhyolite Software, LLC .\" .\" This agreement is not applicable to any entity which sells anti-spam .\" solutions to others or provides an anti-spam solution as part of a .\" security solution sold to other entities, or to a private network .\" which employs the DCC or uses data provided by operation of the DCC .\" but does not provide corresponding data to other users. .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" Parties not eligible to receive a license under this agreement can .\" obtain a commercial license to use DCC and permission to use .\" U.S. Patent 6,330,590 by contacting Commtouch at http://www.commtouch.com/ .\" or by email to nospam@commtouch.com. .\" .\" A commercial license would be for Distributed Checksum and Reputation .\" Clearinghouse software. That software includes additional features. This .\" free license for Distributed ChecksumClearinghouse Software does not in any .\" way grant permision to use Distributed Checksum and Reputation Clearinghouse .\" software .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE, LLC DISCLAIMS ALL .\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE, LLC .\" BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, .\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" .\" Rhyolite Software DCC 1.3.50-1.49 $Revision$ .\" .Dd 2007/01/15 19:48:54 .ds volume-ds-DCC Distributed Checksum Clearinghouse .Dt dbclean 8 DCC .Os " " .Sh NAME .Nm dbclean .Nd Clean Distributed Checksum Clearinghouse Database .Sh SYNOPSIS .Bk -words .Nm dbclean .Op Fl dDfFNRPSVq .Op Fl i Ar id .Oo .Fl a Xo .Sm off .Op Ar server-addr .Op Ar ,port .Xc .Sm on .Oc .Op Fl h Ar homedir .br .Op Fl G Ar on .Op Fl s Ar hash-size .Op Fl e Ar seconds .Op Fl E Ar spamsecs .br .Op Fl t Ar type,allsecs,threshold,bulksecs .Op Fl L Ar ltype,facility.level .Ek .Sh DESCRIPTION .Nm 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 .Xr dccd 8 . It should also be run by .Xr cron 8 approximately daily. .Pp If the hash table in the database has been damaged, .Nm tries to repair the database. .Pp The contents of the .Pa whitelist file are built into the DCC server's database. Changes to the whitelist are not effective until dbclean is run to expire reports. White or blacklists can also be used by DCC clients, and generally work better there. .Ss OPTIONS The following options are available: .Bl -tag -width xxx .It Fl d enables debugging output. Additional .Fl d options increase the number of messages. .It Fl D indicates that .Xr dccd 8 started .Nm . .It Fl F uses write() instead of mmap() 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. .It Fl f turns off .Fl F . .It Fl N creates a new, empty database. There must not be an existing database and the DCC server, .Xr dccd 8 , must not be running. .It Fl R repairs a database. .It Fl P expires old checksums from a database using the .Fl e , .Fl E , and .Fl t values from the preceding use of .Nm dbclean . .Fl P cannot be used with .Fl e , .Fl E , or .Fl t . Note also that using .Fl P differs from not using .Fl e , .Fl E or .Fl t , because in the absence of all four, their default values are used. .It Fl S says that the DCC server, .Xr dccd 8 , is not running and so .Nm should run stand-alone and not try to tell the DCC server about changes to the database. .Fl i is not needed when .Fl S is present. .It Fl V displays the version of the DCC database cleaner. .It Fl q quiets the announcement of results at the end. .It Fl i Ar id specifies the DCC ID recognized by the local DCC server as its own. This ID allows the DCC server to recognize commands from .Nm to stop using the database while it is being cleaned. .It Fl a Xo .Sm off .Op Ar server-addr .Op Ar ,port .Xc .Sm on is commonly used to specify a UDP port or IP address of the local server other than the default. .It Fl h Ar homedir overrides the default DCC home directory, which is often /var/dcc. .It Fl G Ar on cleans a greylist database. .It Fl s Ar hash-size specifies a size for the hash table. By default the hash table is rebuilt to be approximately 80% full based on an estimate of the number of distinct checksums in the main file. .It Fl e Ar seconds specifies that reports older than .Ar seconds and with totals below their .Fl t thresholds should be deleted. Reports older than .Ar seconds of checksums that have been reported more recently are summarized in the database. The default value is 1DAY or the value of .Fl 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. .Ar Seconds can also be .Ar NEVER or a number of hours, days, or weeks followed by .Ar HOURS , .Ar H , .Ar DAYS , .Ar D , .Ar WEEKS or .Ar W . .Pp The .Fl e thresholds for both DCC Reputation counts must be the same. Their default values of 1DAY is not affected by the size of the system's RAM. .Pp 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. .It Fl E Ar spamsecs changes the expiration of checksums exceding .Fl t thresholds from the default of 30DAYS or the explicit value of .Fl e , whichever is larger. The default is reduced if the system does not have enough RAM to hold the database. .Ar Spamsecs can also be .Ar NEVER or a number of hours, days, or weeks followed by .Ar HOURS , .Ar H , .Ar DAYS , .Ar D , .Ar WEEKS or .Ar W . .\" see DB_EXPIRE_SPAMSECS_DEF .It Fl t Ar type,allsecs Ns Op Ar ,threshold,bulksecs overrides the global .Fl e setting and specifies that reports of checksums of .Ar type with total counts of at least .Ar threshold should be kept for .Ar bulksecs seconds. All reports should be kept for the shorter duration, .Ar allsecs seconds. The threshold is either a number or the string .Ar MANY indicating millions of targets. By default .Nm acts as if given .Bk -words .Fl t Ar Fuz1,seconds,10,spamsecs .Fl t Ar Fuz2,seconds,10,spamsecs , .\" see BULK_THRESHOLD for the threshold count .\" see DCC_CK_LONG_TERM for which checksums get long lives .Ek where .Ar seconds is the value for .Fl e and .Ar spamsecs is the value for .Fl E . All other checksum types act by default as if .Bk -words .Fl t Ar type,seconds were specified. .Ar Allsecs and .Ar bulksecs can also be .Ar NEVER or a number of hours, days, or weeks followed by .Ar HOURS , .Ar H , .Ar DAYS , .Ar D , .Ar WEEKS or .Ar W . .Pp .Ar Threshold for both DCC Reputation counts is fixed at the equivalent of 1%. .It Fl L Ar ltype,facility.level specifies how messages should be logged. .Ar Ltype must be .Ar error or .Ar info to indicate which of the two types of messages are being controlled. .Ar Level must be a .Xr syslog 3 level among .Ar EMERG , .Ar ALERT , .Ar CRIT , ERR , .Ar WARNING , .Ar NOTICE , .Ar INFO , and .Ar DEBUG . .Ar Facility must be among .Ar AUTH , .Ar AUTHPRIV , .Ar CRON , .Ar DAEMON , .Ar FTP , .Ar KERN , .Ar LPR , .Ar MAIL , .Ar NEWS , .Ar USER , .Ar UUCP , and .Ar LOCAL0 through .Ar LOCAL7 . The default is equivalent to .Pp .Dl -L info,MAIL.NOTICE -L error,MAIL.ERR .El .Pp .Nm exits 0 on success, and > 0 if an error occurs. .Sh FILES .Bl -tag -width grey_db.hash -compact .It Pa /var/dcc is the DCC home directory containing data and control files. .It Pa dcc_db is the main file containing mail checksums. .It Pa dcc_db.hash mail checksum database hash table. .It Pa grey_db is the database of greylist checksums. .It Pa grey_db.hash is the greylist database hash table. .It Pa dcc_db-new , dcc_db-new.hash , grey_db-new , grey_db-new.hash new database and hash files until they are renamed. .It Pa dcc_db-old , grey_db-old previous database files. .It Pa ids list of IDs and passwords, as described in .Xr dccd 8 . .It Pa whitelist contains the DCC server whitelist in the format described in .Xr dcc 8 . .It Pa grey_whitelist contains the greylist server whitelist. .El .Sh SEE ALSO .Xr cdcc 8 , .Xr cron 8 , .Xr dcc 8 , .Xr dccd 8 , .Xr dblist 8 , .Xr dccifd 8 , .Xr dccm 8 , .Xr dccproc 8 . .Sh HISTORY Implementation of .Nm was started at Rhyolite Software, in 2000. This describes version 1.3.50. .\" LocalWords: whitelist Dcc