1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> <head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<title> Postfix manual - lmdb_table(5) </title> 6</head> <body> <pre> 7LMDB_TABLE(5) LMDB_TABLE(5) 8 9<b>NAME</b> 10 lmdb_table - Postfix LMDB adapter 11 12<b>SYNOPSIS</b> 13 <b>postmap <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> 14 <b>postmap -i <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> <<i>inputfile</i> 15 16 <b>postmap -d "</b><i>key</i><b>" <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> 17 <b>postmap -d - <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> <<i>inputfile</i> 18 19 <b>postmap -q "</b><i>key</i><b>" <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> 20 <b>postmap -q - <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> <<i>inputfile</i> 21 22<b>DESCRIPTION</b> 23 The Postfix LMDB adapter provides access to a persistent, mem- 24 ory-mapped, key-value store. The database size is limited only by the 25 size of the memory address space (typically 31 or 47 bits on 32-bit or 26 64-bit CPUs, respectively) and by the available file system space. 27 28<b>REQUESTS</b> 29 The LMDB adapter supports all Postfix lookup table operations. This 30 makes LMDB suitable for Postfix address rewriting, routing, access 31 policies, caches, or any information that can be stored under a fixed 32 lookup key. 33 34 When a transaction fails due to a full database, Postfix resizes the 35 database and retries the transaction. 36 37 Postfix table lookups may generate partial search keys such as domain 38 names without one or more subdomains, network addresses without one or 39 more least-significant octets, or email addresses without the local- 40 part, address extension or domain portion. This behavior is also found 41 with, for example, <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">hash</a>:, or <a href="ldap_table.5.html">ldap</a>: tables. 42 43 Changes to an LMDB database do not trigger an automatic daemon restart, 44 and do not require a daemon restart with "<b>postfix reload</b>". 45 46<b>RELIABILITY</b> 47 LMDB's copy-on-write architecture provides safe updates, at the cost of 48 using more space than some other flat-file databases. Read operations 49 are memory-mapped for speed. Write operations are not memory-mapped to 50 avoid silent corruption due to stray pointer bugs. 51 52 Multiple processes can safely update an LMDB database without serializ- 53 ing requests through the <a href="proxymap.8.html">proxymap(8)</a> service. This makes LMDB suitable 54 as a shared cache for <a href="verify.8.html">verify(8)</a> or <a href="postscreen.8.html">postscreen(8)</a> services. 55 56<b>SYNCHRONIZATION</b> 57 The Postfix LMDB adapter does not use LMDB's built-in locking scheme, 58 because that would require world-writable lockfiles and would violate 59 the Postfix security model. Instead, Postfix uses fcntl(2) locks with 60 whole-file granularity. Programs that use LMDB's built-in locking pro- 61 tocol will corrupt a Postfix LMDB database or will read garbage. 62 63 Every Postfix LMDB database read or write transaction must be protected 64 from start to end with a shared or exclusive fcntl(2) lock. A writer 65 may atomically downgrade an exclusive lock to a shared lock, but it 66 must hold an exclusive lock while opening another write transaction. 67 68 Note that fcntl(2) locks do not protect transactions within the same 69 process against each other. If a program cannot avoid making simulta- 70 neous database requests, then it must protect its transactions with 71 in-process locks, in addition to the per-process fcntl(2) locks. 72 73<b>CONFIGURATION PARAMETERS</b> 74 Short-lived programs automatically pick up changes to <a href="postconf.5.html">main.cf</a>. With 75 long-running daemon programs, Use the command "<b>postfix reload</b>" after a 76 configuration change. 77 78 <b><a href="postconf.5.html#lmdb_map_size">lmdb_map_size</a> (16777216)</b> 79 The initial OpenLDAP LMDB database size limit in bytes. 80 81<b>SEE ALSO</b> 82 <a href="postconf.1.html">postconf(1)</a>, Postfix supported lookup tables 83 <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table maintenance 84 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 85 86<b>README FILES</b> 87 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview 88 <a href="LMDB_README.html">LMDB_README</a>, Postfix OpenLDAP LMDB howto 89 90<b>LICENSE</b> 91 The Secure Mailer license must be distributed with this software. 92 93<b>HISTORY</b> 94 LMDB support was introduced with Postfix version 2.11. 95 96<b>AUTHOR(S)</b> 97 Howard Chu 98 Symas Corporation 99 100 Wietse Venema 101 IBM T.J. Watson Research 102 P.O. Box 704 103 Yorktown Heights, NY 10598, USA 104 105 Wietse Venema 106 Google, Inc. 107 111 8th Avenue 108 New York, NY 10011, USA 109 110 LMDB_TABLE(5) 111</pre> </body> </html> 112