Home | History | Annotate | Line # | Download | only in html
      1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
      2         "https://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>
      8 LMDB_TABLE(5)                                                    LMDB_TABLE(5)
      9 
     10 <b><a name="name">NAME</a></b>
     11        lmdb_table - Postfix LMDB adapter
     12 
     13 <b><a name="synopsis">SYNOPSIS</a></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> &lt;<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> &lt;<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> &lt;<i>inputfile</i>
     22 
     23 <b><a name="description">DESCRIPTION</a></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><a name="requests">REQUESTS</a></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><a name="reliability">RELIABILITY</a></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><a name="synchronization">SYNCHRONIZATION</a></b>
     58        The Postfix LMDB adapter does not use LMDB's built-in  locking  scheme,
     59        because  that would require world-writable lockfiles and therefore vio-
     60        late the Postfix security model.  Instead, Postfix uses fcntl(2)  locks
     61        with whole-file granularity.  Programs that use LMDB's built-in locking
     62        protocol 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 process
     66        may atomically downgrade an exclusive lock  to  a  shared  lock  before
     67        opening a database read transaction, but it must hold an exclusive lock
     68        while opening a write transaction.
     69 
     70        Note that fcntl(2) locks do not protect transactions  within  the  same
     71        process  against each other.  If a program cannot avoid making simulta-
     72        neous database requests, then it must  protect  its  transactions  with
     73        in-process locks, in addition to the per-process fcntl(2) locks.
     74 
     75 <b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b>
     76        Short-lived  programs  automatically  pick up changes to <a href="postconf.5.html">main.cf</a>.  With
     77        long-running daemon programs, Use the command "<b>postfix reload</b>" after  a
     78        configuration change.
     79 
     80        <b><a href="postconf.5.html#lmdb_map_size">lmdb_map_size</a> (16777216)</b>
     81               The initial OpenLDAP LMDB database size limit in bytes.
     82 
     83 <b><a name="see_also">SEE ALSO</a></b>
     84        <a href="postconf.1.html">postconf(1)</a>, Postfix supported lookup tables
     85        <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table maintenance
     86        <a href="postconf.5.html">postconf(5)</a>, configuration parameters
     87 
     88 <b><a name="readme_files">README FILES</a></b>
     89        <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
     90        <a href="LMDB_README.html">LMDB_README</a>, Postfix OpenLDAP LMDB howto
     91 
     92 <b><a name="license">LICENSE</a></b>
     93        The Secure Mailer license must be distributed with this software.
     94 
     95 <b><a name="history">HISTORY</a></b>
     96        LMDB support was introduced with Postfix version 2.11.
     97 
     98 <b>AUTHOR(S)</b>
     99        Howard Chu
    100        Symas Corporation
    101 
    102        Wietse Venema
    103        IBM T.J. Watson Research
    104        P.O. Box 704
    105        Yorktown Heights, NY 10598, USA
    106 
    107        Wietse Venema
    108        Google, Inc.
    109        111 8th Avenue
    110        New York, NY 10011, USA
    111 
    112                                                                  LMDB_TABLE(5)
    113 </pre> </body> </html>
    114