Man Pages

dbclean(8) - phpMan dbclean(8) - phpMan

Command: man perldoc info search(apropos)  


dbclean(8)                BSD System Manager's Manual               dbclean(8)

NAME
     dbclean - Clean Distributed Checksum Clearinghouse Database

SYNOPSIS
     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]

DESCRIPTION
     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 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 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 of messages.

     -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 database 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 log.

     -i id
          specifies the DCC ID recognized by the local DCC server as its own.  This ID allows the DCC server to recog-
          nize commands from dbclean to 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 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 significantly
          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 run-
          ning or waiting for the nightly run of the /var/dcc/libexec/cron-dccd cron job.  Do not use -H with -F or
          -f.

     -G on
          cleans a greylist database in /var/dcc/grey_db and /var/dcc/grey_db.hash instead of 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 the cron(8) job, /var/dcc/libexec/cron-dccd
          del    to finish processing a delete command received by dccd(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 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 num-
          ber of hours, days, or weeks followed 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.

     -E spamsecs
          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.

     -L ltype,facility.level
          specifies how messages should be logged.  Ltype must be error, info, or off to indicate which of the two
          types of messages are being controlled 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.

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 in dccd(8).
     whitelist     contains the DCC server whitelist in the format described in dcc(8).
     grey_whitelist
                   contains the greylist server whitelist.

SEE ALSO
     cdcc(8), cron(8), dcc(8), dccd(8), dblist(8), dccifd(8), dccm(8), dccproc(8).

HISTORY
     Implementation of dbclean was started at Rhyolite Software, in 2000.  This document describes version 1.3.158.

                                April 03, 2015