Changeset 90066bf for server


Ignore:
Timestamp:
11/21/2023 02:51:49 AM (5 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, ken/TL2024, ken/tuningfonts, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18
Children:
61936ca3
Parents:
c94de90
git-author:
Xi Ruoyao <xry111@…> (11/21/2023 02:39:54 AM)
git-committer:
Xi Ruoyao <xry111@…> (11/21/2023 02:51:49 AM)
Message:

postfix: Switch from db to lmdb

DB is slated for remove in BLFS 12.1, so switch from it now.

Though postfix supports various DB formats, the only formats can be used
for postmap are btree, cdb, dbm, hash, lmdb, and sdbm. btree and hash
needs db; cdb, dbm, sdbm needs something out of BLFS. So lmdb should be
recommended or we'll have no postmap support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/mail/postfix.xml

    rc94de90 r90066bf  
    8787    <bridgehead renderas="sect4">Recommended</bridgehead>
    8888    <para role="recommended">
    89       <xref linkend="db"/>,
    90       <xref linkend="cyrus-sasl"/>, and
    91       <xref linkend="libnsl"/>
     89      <xref linkend="cyrus-sasl"/>,
     90      <xref linkend="libnsl"/>, and
     91      <xref linkend="lmdb"/>
    9292    </para>
    9393
    9494    <bridgehead renderas="sect4">Optional</bridgehead>
    9595    <para role="optional">
     96      <xref linkend="db"/>,
    9697      <xref linkend="icu"/> for Email Address Internationalization (SMTPUTF8) support,
    9798      <xref linkend="mariadb"/> or <ulink url="https://www.mysql.com/">MySQL</ulink>,
     
    162163        <para>
    163164          For all variants of the CCARGS you should ensure that -DNO_NIS is
    164           specified so that the build does not attempt to access an rpcsvc header
    165           which does not exist in BLFS.
     165          specified so that the build does not attempt to access an rpcsvc
     166          header which do not exist in BLFS.  If <xref linkend='db'/> is
     167          not installed, -DNO_DB needs to be specified as well.
    166168        </para>
    167169      </note>
     
    179181        </para>
    180182
    181 <screen><literal>CCARGS='-DNO_NIS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
     183<screen><literal>CCARGS="-DNO_NIS -DNO_DB \
     184        -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
    182185AUXLIBS='-lsasl2'</literal></screen>
    183 
     186      </sect4>
     187
     188      <sect4>
     189        <title>LMDB</title>
     190        <para>
     191          To use <application>LMDB</application> with
     192          <application>Postfix</application>, use the following arguments:
     193        </para>
     194
     195<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_LMDB'
     196AUXLIBS_LMDB='-llmdb'</literal></screen>
    184197      </sect4>
    185198
     
    192205        </para>
    193206
    194 <screen><literal>CCARGS='-DNO_NIS -DHAS_LDAP'
     207<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_LDAP'
    195208AUXLIBS='-lldap -llber'</literal></screen>
    196209
     
    205218        </para>
    206219
    207 <screen><literal>CCARGS='-DNO_NIS -DHAS_SQLITE'
     220<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_SQLITE'
    208221AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
    209222
     
    218231        </para>
    219232
    220 <screen><literal>CCARGS='-DNO_NIS -DHAS_MYSQL -I/usr/include/mysql'
     233<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_MYSQL -I/usr/include/mysql'
    221234AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
    222235
     
    231244        </para>
    232245
    233 <screen><literal>CCARGS='-DNO_NIS -DHAS_PGSQL -I/usr/include/postgresql'
     246<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_PGSQL -I/usr/include/postgresql'
    234247AUXLIBS='-lpq -lz -lm'</literal></screen>
    235248
     
    245258        </para>
    246259
    247 <screen><literal>CCARGS='-DNO_NIS -DHAS_CDB'
     260<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DHAS_CDB'
    248261AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
    249262
     
    258271        </para>
    259272
    260 <screen><literal>CCARGS='-DNO_NIS -DUSE_TLS -I/usr/include/openssl/'
     273<screen><literal>CCARGS='-DNO_NIS -DNO_DB -DUSE_TLS -I/usr/include/openssl/'
    261274AUXLIBS='-lssl -lcrypto'</literal></screen>
    262275      </sect4>
     
    269282      <para>
    270283        Adjust the following according to your needs. For example,
    271         if you have <application>Cyrus SASL</application>,
     284        if you have <application>Cyrus SASL</application> and
     285        <application>LMDB</application>,
    272286        install <application>Postfix</application> by running the following
    273287        commands:
    274288      </para>
    275289
    276 <screen><userinput>make CCARGS="-DNO_NIS -DUSE_TLS -I/usr/include/openssl/            \
    277              -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
     290<screen><userinput>make CCARGS="-DNO_NIS -DNO_DB -DUSE_TLS -I/usr/include/openssl/    \
     291             -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl  \
     292             -DHAS_LMDB"                                           \
    278293     AUXLIBS="-lssl -lcrypto -lsasl2"                              \
     294     AUXLIBS_LMDB="-llmdb"                                         \
    279295     makefiles &amp;&amp;
    280296make</userinput></screen>
     
    376392        the above command appends these aliases to it if it exists. This file
    377393        should be checked and duplicate aliases removed, if present.
     394      </para>
     395
     396      <para>
     397        The BLFS editors recommend to use LMDB instead of Berkeley DB for
     398        Postfix lookup tables.  Add a line into
     399        <filename>/etc/postfix/main.cf</filename> to make
     400        <command>postmap</command> to encode the lookup tables in the LMDB
     401        format by default:
     402      </para>
     403
     404<screen role="root"><userinput>echo 'default_database_type = lmdb' &gt;&gt; /etc/postfix/main.cf</userinput></screen>
     405
     406      <para>
     407        Note that if you are following an online tutorial to configure
     408        Postfix, the tutorial may refer to a lookup table with
     409        <literal>hash:/path/to/lookup_table</literal>.  You should replace
     410        <literal>hash</literal> with <literal>lmdb</literal> in order to use
     411        a lookup table encoded in the LMDB format.
    378412      </para>
    379413
Note: See TracChangeset for help on using the changeset viewer.