xref: /netbsd-src/external/ibm-public/postfix/dist/proto/lmdb_table (revision 16d67a18c4cbb2d3cb426b01120f4938ca6dbbf9)
1#++
2# NAME
3#	lmdb_table 5
4# SUMMARY
5#	Postfix LMDB adapter
6# SYNOPSIS
7#	\fBpostmap lmdb:/etc/postfix/\fIfilename\fR
8# .br
9#	\fBpostmap -i lmdb:/etc/postfix/\fIfilename\fB <\fIinputfile\fR
10#
11#	\fBpostmap -d "\fIkey\fB" lmdb:/etc/postfix/\fIfilename\fR
12# .br
13#	\fBpostmap -d - lmdb:/etc/postfix/\fIfilename\fB <\fIinputfile\fR
14#
15#	\fBpostmap -q "\fIkey\fB" lmdb:/etc/postfix/\fIfilename\fR
16# .br
17#	\fBpostmap -q - lmdb:/etc/postfix/\fIfilename\fB <\fIinputfile\fR
18# DESCRIPTION
19#	The Postfix LMDB adapter provides access to a persistent,
20#	memory-mapped, key-value store.  The database size is limited
21#	only by the size of the memory address space (typically 31
22#	or 47 bits on 32-bit or 64-bit CPUs, respectively) and by
23#	the available file system space.
24# REQUESTS
25# .ad
26# .fi
27#	The LMDB adapter supports all Postfix lookup table operations.
28#	This makes LMDB suitable for Postfix address rewriting,
29#	routing, access policies, caches, or any information that
30#	can be stored under a fixed lookup key.
31#
32#	When a transaction fails due to a full database, Postfix
33#	resizes the database and retries the transaction.
34#
35#	Postfix table lookups may generate partial search keys such
36#	as domain names without one or more subdomains, network
37#	addresses without one or more least-significant octets, or
38#	email addresses without the localpart, address extension
39#	or domain portion.  This behavior is also found with, for
40#	example, btree:, hash:, or ldap: tables.
41#
42#	Unlike other flat-file Postfix databases, changes to
43#	an LMDB database do not trigger automatic daemon program
44#	restart, and do not require "\fBpostfix reload\fR".
45# RELIABILITY
46# .ad
47# .fi
48#	LMDB's copy-on-write architecture provides safe updates,
49#	at the cost of using more space than some other flat-file
50#	databases.  Read operations are memory-mapped for speed.
51#	Write operations are not memory-mapped to avoid silent
52#	curruption due to stray pointer bugs.
53#
54#	Multiple processes can safely update an LMDB database without
55#	serializing requests through the proxymap(8) service.  This
56#	makes LMDB suitable as a shared cache for verify(8) or
57#	postscreen(8) services.
58# SYNCHRONIZATION
59# .ad
60# .fi
61#	The Postfix LMDB adapter does not use LMDB's built-in locking
62#	scheme, because that would require world-writable lockfiles
63#	and would violate the Postfix security model.  Instead,
64#	Postfix uses fcntl(2) locks with whole-file granularity.
65#	Programs that use LMDB's built-in locking protocol will
66#	corrupt a Postfix LMDB database or will read garbage.
67#
68#	Every Postfix LMDB database read or write transaction must
69#	be protected from start to end with a shared or exclusive
70#	fcntl(2) lock.  A writer may atomically downgrade an exclusive
71#	lock to a shared lock, but it must acquire an exclusive
72#	lock between updating the database and starting another
73#	write transaction.
74#
75#	Note that fcntl(2) locks do not protect transactions within
76#	the same process against each other.  If a program cannot
77#	avoid making simultaneous database requests, then it must
78#	protect its transactions with in-process locks, in addition
79#	to the per-process fcntl(2) locks.
80# CONFIGURATION PARAMETERS
81# .ad
82# .fi
83#	Short-lived programs automatically pick up changes to
84#	main.cf.  With long-running daemon programs, Use the command
85#	"\fBpostfix reload\fR" after a configuration change.
86# .IP "\fBlmdb_map_size (default: 16777216)\fR"
87#	The initial LMDB database size limit in bytes.
88# SEE ALSO
89#	postconf(1), Postfix supported lookup tables
90#	postmap(1), Postfix lookup table maintenance
91#	postconf(5), configuration parameters
92# README FILES
93# .ad
94# .fi
95#	Use "\fBpostconf readme_directory\fR" or
96#	"\fBpostconf html_directory\fR" to locate this information.
97# .na
98# .nf
99#	DATABASE_README, Postfix lookup table overview
100#	LMDB_README, Postfix OpenLDAP LMDB howto
101# LICENSE
102# .ad
103# .fi
104#	The Secure Mailer license must be distributed with this software.
105# HISTORY
106#	LMDB support was introduced with Postfix version 2.11.
107# AUTHOR(S)
108#	Howard Chu
109#	Symas Corporation
110#
111#	Wietse Venema
112#	IBM T.J. Watson Research
113#	P.O. Box 704
114#	Yorktown Heights, NY 10598, USA
115#--
116