1MAKEDAT(1)                  Double Precision, Inc.                  MAKEDAT(1)
2
3
4

NAME

6       makedat - create GDBM/DB files for maildrop
7

SYNOPSIS

9       makedat {-src=textfile} {-tmp=tmpfile} {-file=gdbmfile} [-cidr]
10

DESCRIPTION

12       The gdbm family of functions in maildrop provides access to GDBM/DB
13       databases - simple database files. The gdbm family of functions provide
14       a way of quickly storing and looking up key/data pairs.
15
16       You can use any program to create GDBM/DB database files.  makedat is a
17       quick utility to create GDBM or DB files from plain text files.
18
19       The system administrator selects whether maildrop uses GDBM or DB
20       database files and whether makedat creates GDBM or DB database files as
21       well.
22
23       The makedat command may not be available to you. GDBM/DB support in
24       maildrop is optional, and the system administrator may choose not to
25       install GDBM/DB support and the makedat command.
26
27       To see whether GDBM or DB support is being used, run the command
28       "maildrop -v".
29
30       The textfile argument to makedat is a plain text file containing
31       key/value pairs. Each line in the text file contains a key value,
32       followed by a tab and a data value. The data value may be omitted,
33       which defaults to "1". For example, the following three lines:
34
35           example.com
36
37           domain.com<tab>ok
38
39           foo.domain.com<tab>bad
40
41       Three key/value pairs are created: example.com, value "1"; domain.com,
42       value "ok", and "foo.domain.com", value "bad".
43
44       Empty lines in textfile, and lines starting with the # character, are
45       ignored.
46
47       textfile can be "-", in which case standard input is used.
48
49       gdbmfile is the GDBM/DB file to create. If this file exists, its
50       existing contents are replaced.
51
52       tmpfile is a name of a temporary file in the same directory as
53       gdbmfile.  tmpfile is used by makedat to create the GDBM file, then
54       tmpfile is renamed to gdbmfile.
55
56       This approach foregoes any need for locking in order to be able to
57       dynamically update GDBM/DB files used by maildrop's gdbm functions.
58       However, makedat does not use any locks on tmpfile, so multiple
59       instances of makedat using the same tmpfile are prohibited.
60
61       The -cidr flag specifies that the key is an IP netblock in CIDR
62       notation. This flag requires the Net::CIDR Perl module to be installed
63       separately. Download Net::CIDR from http://www.cpan.org.
64

BUGS

66       There are historical reasons why database functions in maildrop are
67       called gdbm functions. The initial implementation used GDBM functions
68       exclusively. The ability to use the DB library instead of the GDBM
69       library has been added later.
70

EXAMPLE

72           makedat blacklist /etc/mail/blacklist.tmp /etc/mail/blacklist.dat
73
74       Takes blacklist, and creates /etc/mail/blacklist.dat, using
75       /etc/mail/blacklist.tmp as a temporary file.
76

SEE ALSO

78       maildrop(1)[1], maildropgdbm(5)[2].
79

AUTHOR

81       Sam Varshavchik
82           Author
83

NOTES

85        1. maildrop(1)
86           http://www.courier-mta.org/maildrop/maildrop.html
87
88        2. maildropgdbm(5)
89           http://www.courier-mta.org/maildrop/maildropgdbm.html
90
91
92
93Courier Mail Server               06/20/2015                        MAKEDAT(1)
Impressum