Commit | Line | Data |
---|---|---|
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_DBMBUILD 8 "March 26, 2003" | |
6 | .\" Please adjust this date whenever revising the manpage. | |
7 | .\" | |
8 | .\" Some roff macros, for reference: | |
9 | .\" .nh disable hyphenation | |
10 | .\" .hy enable hyphenation | |
11 | .\" .ad l left justify | |
12 | .\" .ad b justify to both left and right margins | |
13 | .\" .nf disable filling | |
14 | .\" .fi enable filling | |
15 | .\" .br insert line break | |
16 | .\" .sp <n> insert n+1 empty lines | |
17 | .\" for manpage-specific macros, see man(7) | |
18 | .\" \(oqthis text is enclosed in single quotes\(cq | |
19 | .\" \(lqthis text is enclosed in double quotes\(rq | |
20 | .SH NAME | |
21 | exim_dbmbuild \- Build a DBM file. | |
22 | .SH SYNOPSIS | |
23 | .B exim_dbmbuild | |
24 | .I [\-nolc] [\-nozero] [\-noduperr] [\-nowarn] inputfile|\- outputfile | |
25 | ||
26 | .SH DESCRIPTION | |
27 | The | |
28 | .B exim_dbmbuild | |
29 | program reads an input file containing keys and data in | |
30 | the format used by the | |
31 | .I lsearch | |
32 | lookup (see section 9.1). | |
33 | It writes a DBM file using the lower-cased alias names as keys and the | |
34 | remainder of the information as data. | |
35 | The lower-casing can be prevented by calling the program with the | |
36 | .I \-nolc | |
37 | option. | |
38 | ||
39 | A terminating zero is included as part of the key string. | |
40 | This is expected by the dbm lookup type. | |
41 | However, if the option | |
42 | .I \-nozero | |
43 | is given, | |
44 | .B exim_dbmbuild | |
45 | creates files without terminating zeroes in either the key strings or the | |
46 | data strings. | |
47 | The | |
48 | .I dbmnz | |
49 | lookup type can be used with such files. | |
50 | ||
51 | The program requires two arguments: the name of the input file (which can | |
52 | be a single hyphen to indicate the standard input), and the name of the | |
53 | output file. | |
54 | It creates the output under a temporary name, and then renames it if all | |
55 | went well. | |
56 | If the native DB interface is in use (USE_DB is set in a compile-time | |
57 | configuration file - this is common in free versions of Unix) the two file | |
58 | names must be different, because in this mode the Berkeley DB functions | |
59 | create a single output file using exactly the name given. | |
60 | For example, | |
61 | ||
62 | exim_dbmbuild /etc/aliases /etc/aliases.db | |
63 | ||
64 | reads the system alias file and creates a DBM version of it in | |
65 | /etc/aliases.db. | |
66 | ||
67 | In systems that use the | |
68 | .I ndbm | |
69 | routines (mostly proprietary versions of Unix), two files are used, with the | |
70 | suffixes .dir and .pag. | |
71 | In this environment, the suffixes are added to the second argument of | |
72 | .B exim_dbmbuild, | |
73 | so it can be the same as the first. | |
74 | This is also the case when the Berkeley functions are used in | |
75 | compatibility mode (though this is not recommended), because in that case | |
76 | it adds a .db suffix to the file name. | |
77 | ||
78 | If a duplicate key is encountered, the program outputs a warning, and when | |
79 | it finishes, its return code is 1 rather than zero, unless the | |
80 | .I \-noduperr | |
81 | option is used. | |
82 | By default, only the first of a set of duplicates is used - this makes it | |
83 | compatible with lsearch lookups. | |
84 | There is an option | |
85 | .I \-lastdup | |
86 | which causes it to use the data for the last duplicate instead. | |
87 | There is also an option | |
88 | .I \-nowarn, | |
89 | which stops it listing duplicate keys to \(lqstderr\(rq. | |
90 | For other errors, where it doesn't actually make a new file, the return | |
91 | code is 2. | |
92 | ||
93 | .SH BUGS | |
94 | This manual page needs a major re-work. If somebody knows better groff | |
95 | than us and has more experience in writing manual pages, any patches | |
96 | would be greatly appreciated. | |
97 | ||
98 | .SH SEE ALSO | |
99 | .BR exim (8), | |
100 | /usr/share/doc/exim4\-base/ | |
101 | ||
102 | .SH AUTHOR | |
103 | This manual page was stitched together from spec.txt by | |
104 | Andreas Metzler <ametzler at downhill.at.eu.org>, | |
105 | for the Debian GNU/Linux system (but may be used by others). |