Relax chown requirements when check_owner is false
[hcoop/debian/exim4.git] / debian / manpages / exim_db.8
CommitLineData
de45f55a
AM
1.\" Hey, EMACS: -*- nroff -*-
2.\" First parameter, NAME, should be all caps
3.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4.\" other parameters are allowed: see man(7), man(1)
5.TH EXIM_DB 8 "December 26, 2012"
6.\" Please adjust this date whenever revising the manpage.
7.\" Up to date for 4.80
8.\"
9.\" Some roff macros, for reference:
10.\" .nh disable hyphenation
11.\" .hy enable hyphenation
12.\" .ad l left justify
13.\" .ad b justify to both left and right margins
14.\" .nf disable filling
15.\" .fi enable filling
16.\" .br insert line break
17.\" .sp <n> insert n+1 empty lines
18.\" for manpage-specific macros, see man(7)
19.\" \(oqthis text is enclosed in single quotes\(cq
20.\" \(lqthis text is enclosed in double quotes\(rq
21.SH NAME
22exim_db \- Exim's hint databases maintenance (exim_dumpdb, exim_fixdb, exim_tidydb)
23.SH SYNOPSIS
24.B exim_dumpdb
25.I spooldir database
26.br
27.B exim_fixdb
28.I spooldir database
29.br
30.B exim_tidydb
31.I [\-f] [\-t time] spooldir database
32
33.SH DESCRIPTION
34Three utility programs are provided for maintaining the DBM files that
35Exim uses to contain its delivery hint information.
36Each program requires two arguments.
37The first specifies the name of Exim's spool directory, and the second is
38the name of the database it is to operate on.
39These are as follows:
40.TP
41.B retry
42the database of retry information
43.TP
44.B wait\-<transport name>
45databases of information about messages waiting for remote hosts
46.TP
47.B callout
48the callout cache
49.TP
50.B ratelimit
51the data for implementing the ratelimit ACL condition
52.TP
53.B misc
54other hints data (for example, for serializing ETRN runs)
55.P
56The entire contents of a database are written to the standard output by the
57.B exim_dumpdb
58program, which has no options or arguments other than the spool
59and database names.
60For example, to dump the retry database:
61
62.I exim_dumpdb /var/spool/exim4 retry
63
64Two lines of output are produced for each entry:
65.nf
66 T:mail.ref.example:192.168.242.242 146 77 Connection refused
67 31-Oct-1995 12:00:12 02-Nov-1995 12:21:39 02-Nov-1995 20:21:39 *
68
69.fi
70The first item on the first line is the key of the record.
71It starts with one of the letters R, or T, depending on whether it refers
72to a routing or transport retry.
73For a local delivery, the next part is the local address; for a remote
74delivery it is the name of the remote host, followed by its failing IP
75address (unless \(lqretry_include_ip_address\(rq is set false on the smtp
76transport). If the remote port is not the standard one (port 25), it is
77added to the IP address.
78Then there follows an error code, an additional error code, and a
79textual description of the error.
80
81The three times on the second line are the time of first failure, the time of
82the last delivery attempt, and the computed time for the next attempt.
83The line ends with an asterisk if the cutoff time for the last retry rule
84has been exceeded.
85
86Each output line from
87.B exim_dumpdb
88for the
89.I wait\-xxx
90databases consists of a host name followed by a list of ids for messages
91that are or were waiting to be delivered to that host.
92If there are a very large number for any one host, continuation records,
93with a sequence number added to the host name, may be seen.
94The data in these records is often out of date, because a message may be
95routed to several alternative hosts, and Exim makes no effort to keep
96cross-references.
97
98The
99.B exim_tidydb
100utility program is used to tidy up the contents of a hints database.
101If run with no options, it removes all records that are more than 30 days
102old. The age is calculated from the date and time that the record was last
103updated. Note that, in the case of the retry database, it is not the time
104since the first delivery failure. Information about a host that has been
105down for more than 30 days will remain in the database, provided that the
106record is updated sufficiently often.
107
108The cutoff date can be altered by means of the \-t option, which must be
109followed by a time.
110For example, to remove all records older than a week from the retry
111database:
112
113.I exim_tidydb \-t 7d /var/spool/exim4 retry
114
115Both the
116.I wait\-xxx
117and
118.I retry
119databases contain items that involve message ids.
120In the former these appear as data in records keyed by host - they were
121messages that were waiting for that host - and in the latter they are the
122keys for retry information for messages that have suffered certain types
123of error.
124When \(lqexim_tidydb\(rq is run, a check is made to ensure that message ids in
125database records are those of messages that are still on the queue.
126Message ids for messages that no longer exist are removed from \(lqwait\-\(rqxxx
127records, and if this leaves any records empty, they are deleted.
128For the \(lqretry\(rq database, records whose keys are non-existent message
129ids are removed.
130The
131.B exim_tidydb
132utility outputs comments on the standard output whenever it removes
133information from the database.
134
135Certain records are automatically removed by Exim when they are no longer
136needed, but others are not. For example, if all the MX hosts for a domain
137are down, a retry record is created for each one. If the primary MX host
138comes back first, its record is removed when Exim successfully delivers to
139it, but the records for the others remain because Exim has not tried to use
140those hosts.
141
142It is important, therefore, to run \(lqexim_tidydb\(rq periodically on all
143the hints databases. You should do this at a quiet time of day, because it
144requires a database to be locked (and therefore inaccessible to Exim) while
145it does its work. Removing records from a DBM file does not normally make
146the file smaller, but all the common DBM libraries are able to re-use the
147space that is released. After an initial phase of increasing in size, the
148databases normally reach a point at which they no longer get any bigger, as
149long as they are regularly tidied.
150
151Warning: If you never run \(lqexim_tidydb\(rq, the space used by the hints
152databases is likely to keep on increasing.
153
154The
155.B exim_fixdb
156program is a utility for interactively modifying databases.
157Its main use is for testing Exim, but it might also be occasionally useful
158for getting round problems in a live system.
159It has no options, and its interface is somewhat crude.
160On entry, it prompts for input with a right angle-bracket.
161A key of a database record can then be entered, and the data for that
162record is displayed.
163
164If \(oqd\(cq is typed at the next prompt, the entire record is deleted.
165For all except the
166.I retry
167database, that is the only operation that can be carried out.
168For the
169.I retry
170database, each field is output preceded by a number, and data for individual
171fields can be changed by typing the field number followed by new data, for
172example:
173
174 > 4 951102:1000
175
176resets the time of the next delivery attempt.
177Time values are given as a sequence of digit pairs for year, month, day,
178hour, and minute.
179Colons can be used as optional separators.
180
181.SH BUGS
182This manual page needs a major re-work. If somebody knows better groff
183than us and has more experience in writing manual pages, any patches
184would be greatly appreciated.
185
186.SH SEE ALSO
187.BR exim (8),
188/usr/share/doc/exim4\-base/
189
190.SH AUTHOR
191This manual page was stitched together from spec.txt by
192Andreas Metzler <ametzler at downhill.at.eu.org>,
193for the Debian GNU/Linux system (but may be used by others).