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