1LMDB_TABLE(5)                 File Formats Manual                LMDB_TABLE(5)
2
3
4

NAME

6       lmdb_table - Postfix LMDB adapter
7

SYNOPSIS

9       postmap lmdb:/etc/postfix/filename
10       postmap -i lmdb:/etc/postfix/filename <inputfile
11
12       postmap -d "key" lmdb:/etc/postfix/filename
13       postmap -d - lmdb:/etc/postfix/filename <inputfile
14
15       postmap -q "key" lmdb:/etc/postfix/filename
16       postmap -q - lmdb:/etc/postfix/filename <inputfile
17

DESCRIPTION

19       The  Postfix  LMDB  adapter  provides  access  to  a  persistent,  mem‐
20       ory-mapped, key-value store.  The database size is limited only by  the
21       size  of the memory address space (typically 31 or 47 bits on 32-bit or
22       64-bit CPUs, respectively) and by the available file system space.
23

REQUESTS

25       The LMDB adapter supports all Postfix lookup  table  operations.   This
26       makes  LMDB  suitable  for  Postfix  address rewriting, routing, access
27       policies, caches, or any information that can be stored under  a  fixed
28       lookup key.
29
30       When  a  transaction  fails due to a full database, Postfix resizes the
31       database and retries the transaction.
32
33       Postfix table lookups may generate partial search keys such  as  domain
34       names  without one or more subdomains, network addresses without one or
35       more least-significant octets, or email addresses  without  the  local‐
36       part, address extension or domain portion.  This behavior is also found
37       with, for example, btree:, hash:, or ldap: tables.
38
39       Unlike other flat-file Postfix databases, changes to an  LMDB  database
40       do  not  trigger  automatic  daemon program restart, and do not require
41       "postfix reload".
42

RELIABILITY

44       LMDB's copy-on-write architecture provides safe updates, at the cost of
45       using  more space than some other flat-file databases.  Read operations
46       are memory-mapped for speed.  Write operations are not memory-mapped to
47       avoid silent corruption due to stray pointer bugs.
48
49       Multiple processes can safely update an LMDB database without serializ‐
50       ing requests through the proxymap(8) service.  This makes LMDB suitable
51       as a shared cache for verify(8) or postscreen(8) services.
52

SYNCHRONIZATION

54       The  Postfix  LMDB adapter does not use LMDB's built-in locking scheme,
55       because that would require world-writable lockfiles and  would  violate
56       the  Postfix security model.  Instead, Postfix uses fcntl(2) locks with
57       whole-file granularity.  Programs that use LMDB's built-in locking pro‐
58       tocol will corrupt a Postfix LMDB database or will read garbage.
59
60       Every Postfix LMDB database read or write transaction must be protected
61       from start to end with a shared or exclusive fcntl(2) lock.   A  writer
62       may  atomically  downgrade  an  exclusive lock to a shared lock, but it
63       must hold an exclusive lock while opening another write transaction.
64
65       Note that fcntl(2) locks do not protect transactions  within  the  same
66       process  against each other.  If a program cannot avoid making simulta‐
67       neous database requests, then it must  protect  its  transactions  with
68       in-process locks, in addition to the per-process fcntl(2) locks.
69

CONFIGURATION PARAMETERS

71       Short-lived  programs  automatically  pick up changes to main.cf.  With
72       long-running daemon programs, Use the command "postfix reload" after  a
73       configuration change.
74
75       lmdb_map_size (default: 16777216)
76              The initial LMDB database size limit in bytes.
77

SEE ALSO

79       postconf(1), Postfix supported lookup tables
80       postmap(1), Postfix lookup table maintenance
81       postconf(5), configuration parameters
82

README FILES

84       Use  "postconf readme_directory" or "postconf html_directory" to locate
85       this information.
86       DATABASE_README, Postfix lookup table overview
87       LMDB_README, Postfix OpenLDAP LMDB howto
88

LICENSE

90       The Secure Mailer license must be distributed with this software.
91

HISTORY

93       LMDB support was introduced with Postfix version 2.11.
94

AUTHOR(S)

96       Howard Chu
97       Symas Corporation
98
99       Wietse Venema
100       IBM T.J. Watson Research
101       P.O. Box 704
102       Yorktown Heights, NY 10598, USA
103
104       Wietse Venema
105       Google, Inc.
106       111 8th Avenue
107       New York, NY 10011, USA
108
109
110
111                                                                 LMDB_TABLE(5)
Impressum