Debian Codegraph @

upstream/debian-unstable/man1/makedat.maildrop.1

raw
1 '\" t
2 .\"<!-- Copyright 1998 - 2007 Double Precision, Inc. See COPYING for -->
3 .\"<!-- distribution information. -->
4 .\" Title: makedat
5 .\" Author: Sam Varshavchik
6 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Date: 11/04/2020
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Courier Mail Server
10 .\" Language: English
11 .\"
12 .TH "MAKEDAT" "1" "11/04/2020" "Courier Mail Server" "Double Precision, Inc\&."
13 .\" -----------------------------------------------------------------
14 .\" * Define some portability stuff
15 .\" -----------------------------------------------------------------
16 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .\" http://bugs.debian.org/507673
18 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
19 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .ie \n(.g .ds Aq \(aq
21 .el .ds Aq '
22 .\" -----------------------------------------------------------------
23 .\" * set default formatting
24 .\" -----------------------------------------------------------------
25 .\" disable hyphenation
26 .nh
27 .\" disable justification (adjust text to left margin only)
28 .ad l
29 .\" -----------------------------------------------------------------
30 .\" * MAIN CONTENT STARTS HERE *
31 .\" -----------------------------------------------------------------
32 .SH "NAME"
33 makedat \- create GDBM/DB files for maildrop
34 .SH "SYNOPSIS"
35 .HP \w'\fBmakedat\fR\ 'u
36 \fBmakedat\fR {\-src=\fItextfile\fR} {\-tmp=\fItmpfile\fR} {\-file=\fIgdbmfile\fR} [\-cidr]
37 .SH "DESCRIPTION"
38 .PP
39 The gdbm family of functions in
40 \fBmaildrop\fR
41 provides access to GDBM/DB databases \- simple database files\&. The gdbm family of functions provide a way of quickly storing and looking up key/data pairs\&.
42 .PP
43 You can use any program to create GDBM/DB database files\&.
44 \fBmakedat\fR
45 is a quick utility to create GDBM or DB files from plain text files\&.
46 .PP
47 The system administrator selects whether
48 \fBmaildrop\fR
49 uses GDBM or DB database files and whether
50 \fBmakedat\fR
51 creates GDBM or DB database files as well\&.
52 .PP
53 The
54 \fBmakedat\fR
55 command may not be available to you\&. GDBM/DB support in
56 \fBmaildrop\fR
57 is optional, and the system administrator may choose not to install GDBM/DB support and the
58 \fBmakedat\fR
59 command\&.
60 .PP
61 To see whether GDBM or DB support is being used, run the command "\fBmaildrop \-v\fR"\&.
62 .PP
63 The
64 \fItextfile\fR
65 argument to
66 \fBmakedat\fR
67 is a plain text file containing key/value pairs\&. Each line in the text file contains a key value, followed by a tab and a data value\&. The data value may be omitted, which defaults to "1"\&. For example, the following three lines:
68 .sp
69 .if n \{\
70 .RS 4
71 .\}
72 .nf
73 example\&.com
74
75 domain\&.com<tab>ok
76
77 foo\&.domain\&.com<tab>bad
78 .fi
79 .if n \{\
80 .RE
81 .\}
82 .PP
83 Three key/value pairs are created: example\&.com, value "1"; domain\&.com, value "ok", and "foo\&.domain\&.com", value "bad"\&.
84 .PP
85 Empty lines in
86 \fItextfile\fR, and lines starting with the # character, are ignored\&.
87 .PP
88 \fItextfile\fR
89 can be "\-", in which case standard input is used\&.
90 .PP
91 \fIgdbmfile\fR
92 is the GDBM/DB file to create\&. If this file exists, its existing contents are replaced\&.
93 .PP
94 \fItmpfile\fR
95 is a name of a temporary file in the same directory as
96 \fIgdbmfile\fR\&.
97 \fItmpfile\fR
98 is used by
99 \fBmakedat\fR
100 to create the GDBM file, then
101 \fItmpfile\fR
102 is renamed to
103 \fIgdbmfile\fR\&.
104 .PP
105 This approach foregoes any need for locking in order to be able to dynamically update GDBM/DB files used by
106 \fBmaildrop\fR\*(Aqs gdbm functions\&. However,
107 \fBmakedat\fR
108 does not use any locks on
109 \fItmpfile\fR, so multiple instances of
110 \fBmakedat\fR
111 using the same
112 \fItmpfile\fR
113 are prohibited\&.
114 .PP
115 The
116 \fB\-cidr\fR
117 flag specifies that the key is an IP netblock in CIDR notation\&. This flag requires the
118 Net::CIDR
119 Perl module to be installed separately\&. Download Net::CIDR from
120 \m[blue]\fBhttp://www\&.cpan\&.org\fR\m[]\&.
121 .SH "BUGS"
122 .PP
123 There are historical reasons why database functions in maildrop are called gdbm functions\&. The initial implementation used GDBM functions exclusively\&. The ability to use the DB library instead of the GDBM library has been added later\&.
124 .SH "EXAMPLE"
125 .sp
126 .if n \{\
127 .RS 4
128 .\}
129 .nf
130 makedat blacklist /etc/mail/blacklist\&.tmp /etc/mail/blacklist\&.dat
131 .fi
132 .if n \{\
133 .RE
134 .\}
135 .PP
136 Takes
137 blacklist, and creates
138 /etc/mail/blacklist\&.dat, using
139 /etc/mail/blacklist\&.tmp
140 as a temporary file\&.
141 .SH "SEE ALSO"
142 .PP
143 \m[blue]\fB\fBmaildrop\fR(1)\fR\m[]\&\s-2\u[1]\d\s+2,
144 \m[blue]\fB\fBmaildropgdbm\fR(5)\fR\m[]\&\s-2\u[2]\d\s+2\&.
145 .SH "AUTHOR"
146 .PP
147 \fBSam Varshavchik\fR
148 .RS 4
149 Author
150 .RE
151 .SH "NOTES"
152 .IP " 1." 4
153 \fBmaildrop\fR(1)
154 .RS 4
155 \%http://www.courier-mta.org/maildrop/maildrop.html
156 .RE
157 .IP " 2." 4
158 \fBmaildropgdbm\fR(5)
159 .RS 4
160 \%http://www.courier-mta.org/maildrop/maildropgdbm.html
161 .RE