File: dspam_maintenance.1

package info (click to toggle)
dspam 3.10.1+dfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,656 kB
  • sloc: ansic: 26,034; sh: 12,546; perl: 5,469; makefile: 690; sql: 379
file content (286 lines) | stat: -rw-r--r-- 5,075 bytes parent folder | download
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
.\" $Id: dspam_maintenance.1,v 1.0 2010/04/26 22:28:31 sbajic Exp $
.\"  -*- nroff -*-
.\"
.\" dspam_maintenance
.\"
.\" Authors:	Julien Valroff <julien@kirya.net>
.\"		Stevan Bajic <stevan@bajic.ch>
.\"
.\" Copyright (c) 2010 Julien Valroff <julien@kirya.net> for the
.\" for the Debian project (but may be used by others).
.\"
.TH dspam_maintenance 1  "Apr 26, 2010" "dspam_maintenance" "User Commands"

.SH NAME
.B dspam_maintenance \c
\- remove old signatures and unimportant tokens from the DSPAM storage backend

.SH SYNOPSIS
.na
.B dspam_maintenance
[\c
.B \--profile\c
=PROFILE\c
]
[\c
.B \--logdays\c
=no_of_days\c
]
[\c
.B \--signatures\c
=no_of_days\c
]
[\c
.B \--neutral\c
=no_of_days\c
]
[\c
.B \--unused\c
=no_of_days\c
]
[\c
.B \--hapaxes\c
=no_of_days\c
]
[\c
.B \--hits1s\c
=no_of_days\c
]
[\c
.B \--hits1i\c
=no_of_days\c
]
[\c
.B \--without-sql-purge\c
]
[\c
.B \--with-sql-automatization\c
]
[\c
.B \--with-sql-autoupdate\c
]
[\c
.B \--purgescriptdir\
=directory\c
]
[\c
.B \--with-all-drivers\c
]
[\c
.B \--verbose\c
]

.ad
.SH DESCRIPTION
.LP
.B dspam_maintenance
is used to remove old signatures/tokens and unimportant tokens from the DSPAM
storage backend and purge old log entries in user and system logs.

This script can be called from the command line or run from within cron. Either
add a line in your crontab or add this script in your cron.{hourly,daily,weekly,monthly}.
Running this script every hour might not be the best idea but it's your decision
if you want to do so.

.SH OPTIONS
.LP

.ne 3
.TP
.BI \-\-profile= PROFILE\c
.IP
Specify a storage profile from dspam.conf. The storage profile selected will be used
for all database connectivity.
.IP
.B NOTE: \c
See
.B dspam.conf \c
for more information.

.ne 3
.TP
.BI \-\-logdays= no_of_days\c
.IP
All log entries older than
.B no_of_days \c
days will be removed.
.IP
.B NOTE: \c
Default is
.B 31 \c
days. (for more info:
.B man dspam_logrotate\c
)

.ne 3
.TP
.BI \-\-signatures= no_of_days\c
.IP
All signatures older than
.B no_of_days\c
days will be removed.
.IP
.B NOTE: \c
Default value is set by the
.B PurgeSignatures \c
option in dspam.conf, if this option is not set, the default value is
.B 14 \c
days. This option is only used for the Hash driver.

.ne 3
.TP
.BI \-\-neutral= no_of_days\c
.IP
Deletes all tokens from the target users database whose probability is
between 0.35 and 0.65 (fairly neutral, useless data).
.IP
.B NOTE: \c
Default value is set by the
.B PurgeNeutral \c
option in dspam.conf, if this option is not set, the default value is
.B 90 \c
days.

.ne 3
.TP
.BI \-\-unused= no_of_days\c
.IP
Remove stale tokens which have not been used for a long period of time.
.IP
.B NOTE: \c
Default value is set by the
.B PurgeUnused \c
option in dspam.conf, if this option is not set, the default value is
.B 90 \c
days.

.ne 3
.TP
.BI \-\-hapaxes= no_of_days\c
.IP
Remove tokens with a total hit count below 5 (which will be assigned a hapaxial
value by DSPAM).
.IP
.B NOTE: \c
Default value is set by the
.B PurgeHapaxes \c
option in dspam.conf, if this option is not set, the default value is
.B 30 \c
days.

.ne 3
.TP
.BI \-\-hits1s= no_of_days\c
.IP
Remove tokens with a single SPAM hit.
.IP
.B NOTE: \c
Default value is set by the
.B PurgeHits1S \c
option in dspam.conf, if this option is not set, the default value is
.B 15 \c
days.

.ne 3
.TP
.BI \-\-hits1i= no_of_days\c
.IP
Remove tokens with a single INNOCENT hit.
.IP
.B NOTE: \c
Default value is set by the
.B PurgeHits1I \c
option in dspam.conf, if this option is not set, the default value is
.B 15 \c
days.

.ne 3
.TP
.BI \-\-without\-sql\-purge\c
.IP
Do not use SQL based purging. Only run dspam_clean.
.IP
.B NOTE: \c
Default is
.B off \c
(aka: use SQL based purging).

.ne 3
.TP
.BI \-\-with\-sql\-optimization
.IP
Run VACUUM (for PostgreSQL/SQLite) and/or OPTIMIZE (for MySQL).
.IP
.B NOTE: \c
Default is
.B off \c
(aka: do not use optimizations).

.ne 3
.TP
.BI \-\-with\-sql\-autoupdate
.IP
Run SQL based purging with purge day values passed to dspam_maintenance.
.IP
.B NOTE: \c
Default is
.B off \c
(aka: do not attempt to modify SQL instructions).

.ne 3
.TP
.BI \-\-purgescriptdir= directory
.IP
Space separated list of directories where to search for SQL files
used for the SQL based purging.

.ne 3
.TP
.BI \-\-with\-all\-drivers
.IP
Process all installed storage drivers (not just the active driver).
.IP
.B NOTE: \c
Default is
.B true \c
(aka: process all installed drivers).

.ne 3
.TP
.BI \-\-verbose
.IP
Verbose output while running maintenance script.

.SH EXIT VALUE
.LP
.ne 3
.PD 0
.TP
.B 0
Operation was successful.
.ne 3
.TP
.B other
Operation resulted in an error. Run the script with
.B \-\-verbose \c
to get more information about error.
.PD

.SH COPYRIGHT
Copyright \(co 2002\-2010 DSPAM Project
.br
All rights reserved.
.br

For more information, see http://dspam.sourceforge.net.

.SH SEE ALSO
.BR dspam (1),
.BR dspam_admin (1),
.BR dspam_clean (1),
.BR dspam_crc (1),
.BR dspam_dump (1),
.BR dspam_logrotate (1),
.BR dspam_merge (1),
.BR dspam_stats (1),
.BR dspam_train (1)