1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
|
.\" Copyright (c) 2005 by Rhyolite Software
.\"
.\" 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.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE DISCLAIMS ALL
.\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE
.\" 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.2.74-1.40 $Revision$
.\"
.Dd 2005/02/11 20:45:06
.ds volume-ds-DCC Distributed Checksum Clearinghouse
.Dt dbclean 8 DCC
.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 read() and write() instead of mmap() in some cases to access 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 2 days or the value of
.Fl E ,
whichever is smaller.
The 2 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
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 30 days or
the explicit value of
.Fl e ,
whichever is larger.
The 30 day 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,20,spamsecs
.Fl t Ar Fuz2,seconds,20,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 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 .
.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.2.74.
.\" LocalWords: whitelist
|