~ubuntu-branches/debian/wheezy/courier/wheezy

« back to all changes in this revision

Viewing changes to maildrop/maildropgdbm.7

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Hornburg (Racke)
  • Date: 2009-03-08 16:42:08 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090308164208-nlve2wtx9bbrulmd
Tags: 0.61.2-1
* New upstream release.
* Lintian:
  - fix chown in courier-webadmin postinst
  - removed courier-base preinst
  - added debhelper token to courier-mta.preinst
  - removed *.conffiles

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
.\"  <!-- distribution information. -->
4
4
.\"     Title: maildropgdbm
5
5
.\"    Author: 
6
 
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
7
 
.\"      Date: 04/22/2007
 
6
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
 
7
.\"      Date: 08/24/2008
8
8
.\"    Manual: Double Precision, Inc.
9
9
.\"    Source: Double Precision, Inc.
10
10
.\"
11
 
.TH "MAILDROPGDBM" "7" "04/22/2007" "Double Precision, Inc." "Double Precision, Inc."
 
11
.TH "MAILDROPGDBM" "7" "08/24/2008" "Double Precision, Inc." "Double Precision, Inc."
12
12
.\" disable hyphenation
13
13
.nh
14
14
.\" disable justification (adjust text to left margin only)
15
15
.ad l
16
16
.SH "NAME"
17
 
maildropgdbm \- GDBM/DB support in maildrop
 
17
maildropgdbm - GDBM/DB support in maildrop
18
18
.SH "SYNOPSIS"
19
19
.sp
20
20
.RS 4
30
30
.RE
31
31
.SH "DESCRIPTION"
32
32
.PP
33
 
The gdbm family of functions provides access to the GDBM library \- a library of routines that manage simple database files. The library provides a way of quickly storing and looking up key/data pairs.
34
 
.PP
35
 
GDBM support in
36
 
\fBmaildrop\fR
37
 
is optional, and may not be available to you.
38
 
.PP
39
 
GDBM support in
40
 
\fBmaildrop\fR
41
 
can optionally be implemented using the DB library. This option is selected by the system administrator. If this is the case, these functions still work exactly as described below, except that they will operate on DB hash files, instead of GDBM files.
42
 
.PP
43
 
To see whether GDBM or DB support is used, run the command "\fBmaildrop \-v"\fR.
44
 
.PP
45
 
GDBM support is minimal, and simplistic. A filter file may have only one gdbm file open at the same time. However, the filter file can close the current gdbm file, and open another one. If another filter file is included using the include statement, the included filter file may open its own, separate, gdbm file.
46
 
.PP
47
 
A GDBM file contains a list of key/value pairs. All keys in the GDBM file are unique. After storing an arbitary key/value pair in the GDBM file, the value associated with the given key can be quickly located and retrieved.
 
33
The gdbm family of functions provides access to the GDBM library \- a library of routines that manage simple database files\. The library provides a way of quickly storing and looking up key/data pairs\.
 
34
.PP
 
35
GDBM support in
 
36
\fBmaildrop\fR
 
37
is optional, and may not be available to you\.
 
38
.PP
 
39
GDBM support in
 
40
\fBmaildrop\fR
 
41
can optionally be implemented using the DB library\. This option is selected by the system administrator\. If this is the case, these functions still work exactly as described below, except that they will operate on DB hash files, instead of GDBM files\.
 
42
.PP
 
43
To see whether GDBM or DB support is used, run the command "\fBmaildrop \-v"\fR\.
 
44
.PP
 
45
GDBM support is minimal, and simplistic\. A filter file may have only one gdbm file open at the same time\. However, the filter file can close the current gdbm file, and open another one\. If another filter file is included using the include statement, the included filter file may open its own, separate, gdbm file\.
 
46
.PP
 
47
A GDBM file contains a list of key/value pairs\. All keys in the GDBM file are unique\. After storing an arbitary key/value pair in the GDBM file, the value associated with the given key can be quickly located and retrieved\.
48
48
.SS "gdbmclose \- close gdbm file"
49
49
.sp
50
50
.RS 4
53
53
.fi
54
54
.RE
55
55
.PP
56
 
This function closes the current GDBM file.
 
56
This function closes the current GDBM file\.
57
57
.SS "gdbmfetch \- retrieve data"
58
58
.sp
59
59
.RS 4
62
62
.fi
63
63
.RE
64
64
.PP
65
 
This function retrieves the data for the given key.
 
65
This function retrieves the data for the given key\.
66
66
\fIkey\fR
67
 
is the key to retrieve. The
 
67
is the key to retrieve\. The
68
68
\fBgdbmfetch\fR
69
 
function returns the data associated with this key. If the key does not exist in the GDBM file,
 
69
function returns the data associated with this key\. If the key does not exist in the GDBM file,
70
70
\fBgdbmfetch\fR
71
71
returns the
72
72
\fBdefault\fR
73
 
argument. If the
 
73
argument\. If the
74
74
\fBdefault\fR
75
75
argument is not specified,
76
76
\fBgdbmfetch\fR
77
 
returns empty text. Please note that the
 
77
returns empty text\. Please note that the
78
78
\fBdefault\fR
79
 
argument is not actually evaluated unless the key does not exist in the GDBM file.
 
79
argument is not actually evaluated unless the key does not exist in the GDBM file\.
80
80
.PP
81
81
The
82
82
\fIoptions\fR
83
83
argument specifies additional
84
84
\fBmaildrop\fR
85
 
value\-added features. The following functionality is not available in the GDBM library, but is rather provided by
86
 
\fBmaildrop\fR.
 
85
value\-added features\. The following functionality is not available in the GDBM library, but is rather provided by
 
86
\fBmaildrop\fR\.
87
87
.PP
88
88
If the
89
89
\fIoptions\fR
90
90
argument is set to "D", and the key could not be found in the GDBM database, and the key is of the form "user@domain",
91
91
\fBmaildrop\fR
92
 
will then attempt to look up the key "user@". If that key is also not found,
 
92
will then attempt to look up the key "user@"\. If that key is also not found,
93
93
\fBmaildrop\fR
94
 
finally looks up the key "domain".
 
94
finally looks up the key "domain"\.
95
95
.PP
96
 
If "domain" is also not found, and domain is of the form "a.b.c.d.tld" (with variable number of period\-separated sections),
97
 
\fBmaildrop\fR
98
 
then attempts to look up the key "b.c.d.tld". If that key is not found,
99
 
\fBmaildrop\fR
100
 
tries "c.d.tld", and so on, until a key is found, or there are no more subdomains to remove, at which point
 
96
If "domain" is also not found, and domain is of the form "a\.b\.c\.d\.tld" (with variable number of period\-separated sections),
 
97
\fBmaildrop\fR
 
98
then attempts to look up the key "b\.c\.d\.tld"\. If that key is not found,
 
99
\fBmaildrop\fR
 
100
tries "c\.d\.tld", and so on, until a key is found, or there are no more subdomains to remove, at which point
101
101
\fBgdbmfetch\fR
102
102
will return either the
103
103
\fBdefault\fR
104
 
argument, or empty text.
 
104
argument, or empty text\.
105
105
.PP
106
106
If the
107
107
\fIoptions\fR
108
 
argument is set to "D", and the key could not be found in the GDBM database, and the key is of the form "a.b.c.d.tld" (with variable number of period\-separated sections),
 
108
argument is set to "D", and the key could not be found in the GDBM database, and the key is of the form "a\.b\.c\.d\.tld" (with variable number of period\-separated sections),
109
109
\fBmaildrop\fR
110
 
will also attempt to look up keys for successive higher\-level domains in the GDBM database.
 
110
will also attempt to look up keys for successive higher\-level domains in the GDBM database\.
111
111
.sp
112
112
.it 1 an-trap
113
113
.nr an-no-space-flag 1
114
114
.nr an-break-flag 1
115
115
.br
116
 
\fBNote\fR
 
116
Note
117
117
.PP
118
 
GDBM databases are case sensitive. Make sure that the GDBM database is created using lowercase letters only, and use the
 
118
GDBM databases are case sensitive\. Make sure that the GDBM database is created using lowercase letters only, and use the
119
119
\fI\fBtolower\fR\fR\&[1]
120
 
function to convert the key to lowercase.
 
120
function to convert the key to lowercase\.
121
121
.PP
122
122
If the
123
123
\fIoptions\fR
124
 
argument is "I", and the key is not in the GDBM database, and the key is of the form "w.x.y.z" (with variable number of period\-separated sections),
 
124
argument is "I", and the key is not in the GDBM database, and the key is of the form "w\.x\.y\.z" (with variable number of period\-separated sections),
125
125
\fBmaildrop\fR
126
 
then tries to look up the key "w.x.y", then "w.x", until a key is found, or there are no more sections to remove. Use this feature to look up IP\-address based GDBM lists.
 
126
then tries to look up the key "w\.x\.y", then "w\.x", until a key is found, or there are no more sections to remove\. Use this feature to look up IP\-address based GDBM lists\.
127
127
.sp
128
128
.it 1 an-trap
129
129
.nr an-no-space-flag 1
130
130
.nr an-break-flag 1
131
131
.br
132
 
\fBNote\fR
 
132
Note
133
133
.PP
134
 
These features are implemented by brute force: if the query doesn't succeed, try again. Take note of potential denial\-of\-service attacks where key is set to a long text string consisting mostly of periods, which will result in numerous GDBM queries that will take an excessive amount of time to complete.
 
134
These features are implemented by brute force: if the query doesn\'t succeed, try again\. Take note of potential denial\-of\-service attacks where key is set to a long text string consisting mostly of periods, which will result in numerous GDBM queries that will take an excessive amount of time to complete\.
135
135
.SS "gdbmopen \- open gdbm file"
136
136
.sp
137
137
.RS 4
142
142
.PP
143
143
 
144
144
\fBgdbmopen\fR
145
 
opens the indicated GDBM file. The optional second argument specifies the following:
 
145
opens the indicated GDBM file\. The optional second argument specifies the following:
146
146
.PP
147
147
"R"
148
148
.RS 4
149
 
Open this GDBM file for reading.
 
149
Open this GDBM file for reading\.
150
150
.RE
151
151
.PP
152
152
"W"
153
153
.RS 4
154
 
Open this GDBM file for reading and writing.
 
154
Open this GDBM file for reading and writing\.
155
155
.RE
156
156
.PP
157
157
"C"
158
158
.RS 4
159
 
Open this GDBM file for reading and writing. If the GBDM file doesn't exist, create it.
 
159
Open this GDBM file for reading and writing\. If the GBDM file doesn\'t exist, create it\.
160
160
.RE
161
161
.PP
162
162
"N"
163
163
.RS 4
164
 
Create a new GDBM file. If the file exists, the existing file is deleted. The file is opened for reading and writing.
 
164
Create a new GDBM file\. If the file exists, the existing file is deleted\. The file is opened for reading and writing\.
165
165
.RE
166
166
.PP
167
167
The
168
168
\fImode\fR
169
169
argument defaults to
170
170
"R"
171
 
is used. In embedded mode, only
 
171
is used\. In embedded mode, only
172
172
"R"
173
 
is allowed.
 
173
is allowed\.
174
174
.PP
175
 
The GDBM library allows multiple processes to read the same GDBM file at the same time, but it does not allow multiple access when the GDBM file is open for writing. Using
 
175
The GDBM library allows multiple processes to read the same GDBM file at the same time, but it does not allow multiple access when the GDBM file is open for writing\. Using
176
176
\fI\fBflock\fR\fR\&[2]
177
177
or
178
178
\fI\fBdotlock\fR\fR\&[3]
179
 
is highly recommended.
 
179
is highly recommended\.
180
180
.PP
181
181
In delivery mode,
182
182
\fBmaildrop\fR
183
 
runs from the recipient's home directory. Keep that in mind while specifying the filename.
 
183
runs from the recipient\'s home directory\. Keep that in mind while specifying the filename\.
184
184
.PP
185
 
The gdbmopen function returns 0 if the GDBM file was succesfully opened, non\-zero otherwise.
 
185
The gdbmopen function returns 0 if the GDBM file was succesfully opened, non\-zero otherwise\.
186
186
.SS "gdbmstore \- store data"
187
187
.sp
188
188
.RS 4
193
193
.PP
194
194
 
195
195
\fIkey\fR
196
 
is the key value to store in the GDBM file.
 
196
is the key value to store in the GDBM file\.
197
197
\fIvalue\fR
198
 
is the value to store. If
 
198
is the value to store\. If
199
199
\fIkey\fR
200
200
already exists in the GDBM file,
201
201
\fIvalue\fR
202
 
replacest the old value. The
 
202
replacest the old value\. The
203
203
\fBgdbmstore\fR
204
 
function is only permitted if the GDBM file is opened for writing. If
 
204
function is only permitted if the GDBM file is opened for writing\. If
205
205
\fIgdbmopen\fR
206
206
opened the GDBM file for reading only,
207
207
\fBgdbmstore\fR
208
 
will return \-1. Otherwise,
 
208
will return \-1\. Otherwise,
209
209
\fBgdbmstore\fR
210
 
returns 0.
211
 
.SH "REFERENCES"
 
210
returns 0\.
 
211
.SH "NOTES"
212
212
.IP " 1." 4
213
213
\fBtolower\fR
214
214
.RS 4