aboutsummaryrefslogtreecommitdiff
path: root/doc/mfdbtool.texi
blob: 4d459b59ebeacfca57aac6af3827b7b7b4b30614 (plain)
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
@c This file is part of the Mailfromd manual.
@c Copyright (C) 2011, 2015 Sergey Poznyakoff
@c See file mailfromd.texi for copying conditions.
@c *******************************************************************
@pindex mfdbtool
@UNREVISED
The @command{mfdbtool} utility manages @command{mailfromd} databases.

@menu
* Invoking mfdbtool::
* Configuring mfdbtool::
@end menu

@node Invoking mfdbtool
@section Invoking @command{mfdbtool}
@UNREVISED

@table @option
@opsummary{all, mfdbtool}
@item --all
When used with @option{--compact} or @option{--expire} option, applies
the action to all available databases.  @xref{compact cronjob}.

@opsummary{debug, mfdbtool}
@item -d @var{string}
@itemx --debug=@var{string}
Sets debugging level.  @FIXME{More info.}

@opsummary{expire-interval, mfdbtool}
@item -e @var{interval}
@itemx --expire-interval=@var{interval}
Set expiration intervals for all databases to the specified interval.
@xref{time interval specification}, for a description of
@var{interval} format.  The option overrides the
@code{expire-interval} configuration statement
(@pxref{expire-interval-conf}), which you are advised to use instead.

@opsummary{compact, mfdbtool}
@item --compact
Compact database (@pxref{compaction}).  By default, @samp{cache}
database is compacted.  To specify another database, use
@option{--format} option (@pxref{--format}).  Full database name can
be given in the command line (see @option{--file} option below), if it
differs from the one specified in the script file.

Use with the option @option{--all} (@pxref{--all}) to compact all databases.

@opsummary{delete, mfdbtool}
@item --delete
Delete given entries from the database (@pxref{deleting from
databases}).  By default, @samp{cache} database is assumed.  To
specify another database, use @option{--format} option (@pxref{--format}).  

This option implies @option{--stderr} (@pxref{--stderr}).

@opsummary{expire, mfdbtool}
@item --expire
Delete all expired entries from the database (@pxref{Database
Maintenance}).  By default, @samp{cache} database is assumed.  To
specify another database, use @option{--format} option
(@pxref{--format}).  Full database name can be given in the command
line (see @option{--file} option below), if it differs from the one
specified in the script file. 

Use with the option @option{--all} (@pxref{--all}) to expire all databases.

This option implies @option{--stderr} (@pxref{--stderr}).

@opsummary{file, mfdbtool}
@item -f @var{filename}
@itemx --file=@var{filename}
Set the name of the database to operate upon (for @option{--compact},
@option{--delete}, @option{--expire}, and @option{--list} options).
Useful if, for some reason, you need to operate on a database whose
file name does not match the one @command{mfdbtool} is configured to
use. 

@opsummary{format, mfdbtool}
@item -H @var{dbformat}
@itemx --format=@var{dbformat}
Use database of the given format, instead of the default
@samp{cache}.  @xref{Basic Database Operations}.

@opsummary{ignore-failed-reads, mfdbtool}
@item --ignore-failed-reads
Ignore records that cannot be retrieved while compacting the
database.  Without this option, @command{mfdbtool} will abort the
compaction if any such error is encountered.

@opsummary{list, mfdbtool}
@item  --list
List the database.  By default, @samp{cache} database is assumed.  To
list another database, use @option{--format} option
(@pxref{--format}).

This option implies @option{--stderr} (@pxref{--stderr}).

@xref{Basic Database Operations}.

@opsummary{lock-retry-count, mfdbtool}
@item --lock-retry-count=@var{number}
Set maximum number of attempts to acquire the lock on a database.
See the description of the @code{lock-retry-count} configuration statement,
@FIXME-ref{conf-database@comma{} lock-retry-count}, for more information about the database
locking. 

@opsummary{lock-retry-timeout, mfdbtool}
@item --lock-retry-timeout=@var{interval}
Set the time span between the two locking attempts.  See the
description of the @code{lock-retry-count} configuration statement,
@ref{conf-database, lock-retry-count}, for more information about database
locking.

This option overrides the value set by the @code{lock-retry-timeout}
configuration statement (@FIXME-pxref{conf-database@comma{} lock-retry-timeout-conf})

@xref{time interval specification}, for a description of valid
@var{interval} formats.

@opsummary{predict, mfdbtool}
@item --predict=@var{rate-limit}
Used with @option{--list} enables printing of the estimated times of
sending along with the @samp{rate} database dump.  Implies
@option{--list --format=rate}.  @xref{estimated time of sending}.

@opsummary{state-directory, mfdbtool}
@item --state-directory=@var{dir}
Sets program state directory.  @xref{statedir, Local state directory}, for
the description of this directory and its purposes.  @FIXME{This option
overrides the settings of @code{state-directory} configuration statement,
described in @ref{conf-base, state-directory}.}

@opsummary{time-format, mfdbtool}
@item --time-format=@var{format}
Set format to be used for timestamps in listings, produced by
@option{--list}.  The @var{format} is any valid @code{strftime} format
string, see @ref{Time and Date Formats}, for a detailed description.
The default @var{format} is @samp{%c} (@pxref{%c time format}).  To
analyze @kbd{mfdbtool --list} output using text tools, such as
@code{awk} or @code{grep}, the following format might be useful:
@samp{%s} (@pxref{%s time format}).  Another format I find useful is
@samp{%Y-%m-%d_%H:%M:%S}. 

@end table

@node Configuring mfdbtool
@section Configuring @command{mfdbtool}
@WRITEME

Return to:

Send suggestions and report system problems to the System administrator.